diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index ccc36df3ecdd3d6fdd77965cf8c17800be4853d4..b3a23594ec93474f4e1c6bae31686505ceb03465 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -26,7 +26,7 @@ jobs: - name: Setup Zig uses: goto-bus-stop/setup-zig@v2 with: - version: "0.11.0-dev.3652+f5043ad6a" + version: "0.11.0" - run: zig version - run: zig env diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e4e72f4e02e202b72c697f1ae884477e7a0aa969..aac9fc027d9b555db7af9923067fb8a2f5013193 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -19,7 +19,7 @@ jobs: - name: Setup Zig uses: goto-bus-stop/setup-zig@v2 with: - version: "0.11.0-dev.3652+f5043ad6a" + version: "0.11.0" - run: zig version - run: zig env diff --git a/README.md b/README.md index bd86dac2b6371846ea4f198de4c3b815dd650f84..97bfc9795751203278a4e6803f8aa1e9cbc2160b 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ A package manager for the Zig programming language. - https://github.com/nektro/zigmod/releases ## Built With -- Zig master (at least `0.11.0-dev.3620+c76ce25a6`) +- Zig master (at least `0.11.0`) - See [`zig.mod`](./zig.mod) and [`zigmod.lock`](./zigmod.lock) ### Build from Source diff --git a/deps.zig b/deps.zig index 6bdb91084c3a249024dfb06283a0c0b5028b1cbd..815e47bf9ab2974c2ebbaea1ae89b156aa86ccc7 100644 --- a/deps.zig +++ b/deps.zig @@ -55,23 +55,22 @@ pub fn fetch(exe: *std.build.LibExeObjStep) void { const root = if (@field(package_data, decl.name).store) |_| b.cache_root.path.? else "."; if (path.* != null) path.* = b.fmt("{s}/zigmod/deps{s}", .{ root, path.*.? }); } - exe.step.dependOn(&GitExactStep.create(b, "https://github.com/MasterQ32/zig-uri", "d4299ad6043ad19f2ce0676687b0bff57273eae2").step); - exe.step.dependOn(&GitExactStep.create(b, "https://github.com/marlersoft/zigwin32", "b70e7f818d77a0c0f39b0bd9c549e16439ff5780").step); - exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/arqv-ini", "ee395fd34e152d9067def609d86b7af5382b83b1").step); - exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/iguanaTLS", "e70995575b397f33d798339d4f1656bcdf0ab82f").step); - exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-ansi", "faf9585bfe5980c24748ee8a3e6a22faaa50b437").step); + exe.step.dependOn(&GitExactStep.create(b, "https://github.com/marlersoft/zigwin32", "007649ade45ffb544de3aafbb112de25064d3d92").step); + exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/arqv-ini", "ddbe89bb0d9085e939bcbc713caeb2b7cf852bae").step); + exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/iguanaTLS", "c932f557865abaa1d06cd88e9b22a9f3e583fa59").step); + exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zfetch", "f51277414a2309f776fb79f3d55f26e37f9a54da").step); + exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-ansi", "ac607e4e7ac36d46cc67c8786262578330543a36").step); exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-detect-license", "8f13721bd18c0e546841b6f2e11da839550d6287").step); - exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-extras", "ff267312e8d714c9b9d8c44ad3291f6e509dc12f").step); + exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-extras", "54abdc5bce0b243601ef4808bce1c29e1a46cdec").step); exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-inquirer", "5cc2a5565d04fe2c0085f0d6818590e800d9dcf7").step); exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-leven", "550cabd5a18ace5e67761bc5b867c10e926f4314").step); exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses", "c9b8cbf3565675a056ad4e9b57cb4f84020e7680").step); exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses-text", "3c07c6e4eb0965dafd0b029c632f823631b3169c").step); exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-range", "4b2f12808aa09be4b27a163efc424dd4e0415992").step); - exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-time", "ca9c0e6b644d74c1d549cc2c1ee22113aa021bd8").step); exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-yaml", "e56b9fed6c0afd1c4d29bedc08c3899ffe1165e9").step); - exe.step.dependOn(&GitExactStep.create(b, "https://github.com/truemedian/hzzp", "501386e13b2f7849128f3b271d23de6127b1d9d7").step); - exe.step.dependOn(&GitExactStep.create(b, "https://github.com/truemedian/zfetch", "829973144f680cd16be16923041fa810c1dee417").step); - exe.step.dependOn(&GitExactStep.create(b, "https://github.com/ziglibs/known-folders", "d13ba6137084e55f873f6afb67447fe8906cc951").step); + exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-time", "12fad367a5282827aad7e12f0e9cd36f672c4010").step); + exe.step.dependOn(&GitExactStep.create(b, "https://github.com/truemedian/hzzp", "305aca97fce78eb3e787d57691a5eed5512bece7").step); + exe.step.dependOn(&GitExactStep.create(b, "https://github.com/ziglibs/known-folders", "fa75e1bc672952efa0cf06160bbd942b47f6d59b").step); exe.step.dependOn(&GitExactStep.create(b, "https://github.com/yaml/libyaml", "2c891fc7a770e8ba2fec34fc6b545c672beb37e6").step); } @@ -111,11 +110,11 @@ pub fn addAllTo(exe: *std.build.LibExeObjStep) void { llc = true; } for (pkg.c_include_dirs) |item| { - exe.addIncludePath(b.fmt("{s}/{s}", .{ root, item })); + exe.addIncludePath(.{.path = b.fmt("{s}/{s}", .{ root, item })}); llc = true; } for (pkg.c_source_files) |item| { - exe.addCSourceFile(b.fmt("{s}/{s}", .{ root, item }), pkg.c_source_flags); + exe.addCSourceFile(.{ .file = .{ .path = b.fmt("{s}/{s}", .{ root, item }) }, .flags = pkg.c_source_flags }); llc = true; } vcpkg = vcpkg or pkg.vcpkg; @@ -158,40 +157,35 @@ pub const Package = struct { }; fn checkMinZig(current: std.SemanticVersion, exe: *std.build.LibExeObjStep) void { - const min = std.SemanticVersion.parse("0.11.0-dev.3620+c76ce25a6") catch return; + const min = std.SemanticVersion.parse("0.11.0") catch return; if (current.order(min).compare(.lt)) @panic(exe.step.owner.fmt("Your Zig version v{} does not meet the minimum build requirement of v{}", .{current, min})); } pub const package_data = struct { - pub var _u9w9dpp6p804 = Package{ - .store = "/git/github.com/MasterQ32/zig-uri/d4299ad6043ad19f2ce0676687b0bff57273eae2", - .name = "uri", - .entry = "/git/github.com/MasterQ32/zig-uri/d4299ad6043ad19f2ce0676687b0bff57273eae2/uri.zig", - }; pub var _o6ogpor87xc2 = Package{ - .store = "/git/github.com/marlersoft/zigwin32/b70e7f818d77a0c0f39b0bd9c549e16439ff5780", + .store = "/git/github.com/marlersoft/zigwin32/007649ade45ffb544de3aafbb112de25064d3d92", .name = "win32", - .entry = "/git/github.com/marlersoft/zigwin32/b70e7f818d77a0c0f39b0bd9c549e16439ff5780/win32.zig", + .entry = "/git/github.com/marlersoft/zigwin32/007649ade45ffb544de3aafbb112de25064d3d92/win32.zig", }; pub var _u7sysdckdymi = Package{ - .store = "/git/github.com/nektro/arqv-ini/ee395fd34e152d9067def609d86b7af5382b83b1", + .store = "/git/github.com/nektro/arqv-ini/ddbe89bb0d9085e939bcbc713caeb2b7cf852bae", .name = "ini", - .entry = "/git/github.com/nektro/arqv-ini/ee395fd34e152d9067def609d86b7af5382b83b1/src/ini.zig", + .entry = "/git/github.com/nektro/arqv-ini/ddbe89bb0d9085e939bcbc713caeb2b7cf852bae/src/ini.zig", }; pub var _csbnipaad8n7 = Package{ - .store = "/git/github.com/nektro/iguanaTLS/e70995575b397f33d798339d4f1656bcdf0ab82f", + .store = "/git/github.com/nektro/iguanaTLS/c932f557865abaa1d06cd88e9b22a9f3e583fa59", .name = "iguanaTLS", - .entry = "/git/github.com/nektro/iguanaTLS/e70995575b397f33d798339d4f1656bcdf0ab82f/src/main.zig", + .entry = "/git/github.com/nektro/iguanaTLS/c932f557865abaa1d06cd88e9b22a9f3e583fa59/src/main.zig", }; pub var _s84v9o48ucb0 = Package{ - .store = "/git/github.com/nektro/zig-ansi/faf9585bfe5980c24748ee8a3e6a22faaa50b437", + .store = "/git/github.com/nektro/zig-ansi/ac607e4e7ac36d46cc67c8786262578330543a36", .name = "ansi", - .entry = "/git/github.com/nektro/zig-ansi/faf9585bfe5980c24748ee8a3e6a22faaa50b437/src/lib.zig", + .entry = "/git/github.com/nektro/zig-ansi/ac607e4e7ac36d46cc67c8786262578330543a36/src/lib.zig", }; pub var _f7dubzb7cyqe = Package{ - .store = "/git/github.com/nektro/zig-extras/ff267312e8d714c9b9d8c44ad3291f6e509dc12f", + .store = "/git/github.com/nektro/zig-extras/54abdc5bce0b243601ef4808bce1c29e1a46cdec", .name = "extras", - .entry = "/git/github.com/nektro/zig-extras/ff267312e8d714c9b9d8c44ad3291f6e509dc12f/src/lib.zig", + .entry = "/git/github.com/nektro/zig-extras/54abdc5bce0b243601ef4808bce1c29e1a46cdec/src/lib.zig", }; pub var _0npcrzfdlrvk = Package{ .store = "/git/github.com/nektro/zig-licenses/c9b8cbf3565675a056ad4e9b57cb4f84020e7680", @@ -227,9 +221,9 @@ pub const package_data = struct { .deps = &[_]*Package{ &_pt88y5d80m25, &_96h80ezrvj7i }, }; pub var _iecwp4b3bsfm = Package{ - .store = "/git/github.com/nektro/zig-time/ca9c0e6b644d74c1d549cc2c1ee22113aa021bd8", + .store = "/git/github.com/nektro/zig-time/12fad367a5282827aad7e12f0e9cd36f672c4010", .name = "time", - .entry = "/git/github.com/nektro/zig-time/ca9c0e6b644d74c1d549cc2c1ee22113aa021bd8/time.zig", + .entry = "/git/github.com/nektro/zig-time/12fad367a5282827aad7e12f0e9cd36f672c4010/time.zig", .deps = &[_]*Package{ &_f7dubzb7cyqe }, }; pub var _g982zq6e8wsv = Package{ @@ -239,20 +233,20 @@ pub const package_data = struct { .deps = &[_]*Package{ &_f7dubzb7cyqe }, }; pub var _9k24gimke1an = Package{ - .store = "/git/github.com/truemedian/hzzp/501386e13b2f7849128f3b271d23de6127b1d9d7", + .store = "/git/github.com/truemedian/hzzp/305aca97fce78eb3e787d57691a5eed5512bece7", .name = "hzzp", - .entry = "/git/github.com/truemedian/hzzp/501386e13b2f7849128f3b271d23de6127b1d9d7/src/main.zig", + .entry = "/git/github.com/truemedian/hzzp/305aca97fce78eb3e787d57691a5eed5512bece7/src/main.zig", }; pub var _ejw82j2ipa0e = Package{ - .store = "/git/github.com/truemedian/zfetch/829973144f680cd16be16923041fa810c1dee417", + .store = "/git/github.com/nektro/zfetch/f51277414a2309f776fb79f3d55f26e37f9a54da", .name = "zfetch", - .entry = "/git/github.com/truemedian/zfetch/829973144f680cd16be16923041fa810c1dee417/src/main.zig", - .deps = &[_]*Package{ &_9k24gimke1an, &_csbnipaad8n7, &_u9w9dpp6p804 }, + .entry = "/git/github.com/nektro/zfetch/f51277414a2309f776fb79f3d55f26e37f9a54da/src/main.zig", + .deps = &[_]*Package{ &_9k24gimke1an, &_csbnipaad8n7 }, }; pub var _2ta738wrqbaq = Package{ - .store = "/git/github.com/ziglibs/known-folders/d13ba6137084e55f873f6afb67447fe8906cc951", + .store = "/git/github.com/ziglibs/known-folders/fa75e1bc672952efa0cf06160bbd942b47f6d59b", .name = "known-folders", - .entry = "/git/github.com/ziglibs/known-folders/d13ba6137084e55f873f6afb67447fe8906cc951/known-folders.zig", + .entry = "/git/github.com/ziglibs/known-folders/fa75e1bc672952efa0cf06160bbd942b47f6d59b/known-folders.zig", }; pub var _89ujp8gq842x = Package{ .name = "zigmod", diff --git a/docs/README.md b/docs/README.md index caa9ea822669fafbddc65e5778c9ff504a3473f9..3bf00ec03cd0de3836f3283d660b44aa14167f8d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -10,7 +10,7 @@ The rest of this documentation will assume you already have Zig installed. As Zig is still in development itself, if you plan to contribute to Zigmod you will need a master download of Zig. Those can be obtained from https://ziglang.org/download/#release-master. -The earliest Zig release this Zigmod was verified to work with is `0.11.0-dev.3620+c76ce25a6`. +The earliest Zig release this Zigmod was verified to work with is `0.11.0`. ## Download You may download a precompiled binary from https://github.com/nektro/zigmod/releases or build the project from source. diff --git a/licenses.txt b/licenses.txt index 0ad5694e9227d2bd19df53bce88e6794a1342904..7da938d7c008343d4367a7bf2559fabc391b1b73 100644 --- a/licenses.txt +++ b/licenses.txt @@ -1,10 +1,10 @@ MIT: = https://spdx.org/licenses/MIT - This -- git https://github.com/MasterQ32/zig-uri - git https://github.com/marlersoft/zigwin32 - git https://github.com/nektro/arqv-ini - git https://github.com/nektro/iguanaTLS +- git https://github.com/nektro/zfetch - git https://github.com/nektro/zig-ansi - git https://github.com/nektro/zig-detect-license - git https://github.com/nektro/zig-extras @@ -16,6 +16,5 @@ MIT: - git https://github.com/nektro/zig-time - git https://github.com/nektro/zig-yaml - git https://github.com/truemedian/hzzp -- git https://github.com/truemedian/zfetch - git https://github.com/ziglibs/known-folders - git https://github.com/yaml/libyaml diff --git a/src/cmd/aq.zig b/src/cmd/aq.zig index db7f640680088b08a3c76d437c6ef8d775587adf..5bfeca4fa00db15f7f3b4fdc29e6ae9f1b7b92ff 100644 --- a/src/cmd/aq.zig +++ b/src/cmd/aq.zig @@ -43,7 +43,7 @@ pub fn execute(args: [][]u8) !void { u.fail("unknown command \"{s}\" for \"zigmod aq\"", .{args[0]}); } -pub fn server_fetch(url: string) !std.json.ValueTree { +pub fn server_fetch(url: string) !std.json.Parsed(std.json.Value) { const req = try zfetch.Request.init(gpa, url, null); defer req.deinit(); @@ -57,7 +57,7 @@ pub fn server_fetch(url: string) !std.json.ValueTree { const body_content = try r.readAllAlloc(gpa, std.math.maxInt(usize)); const val = try extras.parse_json(gpa, body_content); - if (val.root.object.get("message")) |msg| { + if (val.value.object.get("message")) |msg| { std.log.err("server: {s}", .{msg.string}); return error.AquilaBadResponse; } diff --git a/src/cmd/aquila/add.zig b/src/cmd/aquila/add.zig index 96ce0638fb8a354dff32ab5991d3c266fae31e9e..e738672f9f1115863732e29d97120ae6663e04d2 100644 --- a/src/cmd/aquila/add.zig +++ b/src/cmd/aquila/add.zig @@ -19,8 +19,8 @@ pub fn do(dir: std.fs.Dir, pkg_id: string) !string { const val = try aq.server_fetch(url); const pkg_url = try std.fmt.allocPrint(gpa, "https://{s}/{s}", .{ - val.root.object.get("repo").?.object.get("domain").?.string, - val.root.object.get("package").?.object.get("remote_name").?.string, + val.value.object.get("repo").?.object.get("domain").?.string, + val.value.object.get("package").?.object.get("remote_name").?.string, }); const m = try zigmod.ModFile.from_dir(gpa, dir); diff --git a/src/cmd/fetch.zig b/src/cmd/fetch.zig index 3887f31b13efa809cd17000085a5fc3933343aae..8aa13456186529629715ff4aaebdd0e6b580f995 100644 --- a/src/cmd/fetch.zig +++ b/src/cmd/fetch.zig @@ -77,11 +77,11 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D \\ llc = true; \\ } \\ for (pkg.c_include_dirs) |item| { - \\ exe.addIncludePath(b.fmt("{s}/{s}", .{ @field(dirs, decl.name), item })); + \\ exe.addIncludePath(.{.path = b.fmt("{s}/{s}", .{ @field(dirs, decl.name), item })}); \\ llc = true; \\ } \\ for (pkg.c_source_files) |item| { - \\ exe.addCSourceFile(b.fmt("{s}/{s}", .{ @field(dirs, decl.name), item }), pkg.c_source_flags); + \\ exe.addCSourceFile(.{ .file = .{ .path = b.fmt("{s}/{s}", .{ @field(dirs, decl.name), item }) }, .flags = pkg.c_source_flags }); \\ llc = true; \\ } \\ vcpkg = vcpkg or pkg.vcpkg; diff --git a/src/cmd/generate.zig b/src/cmd/generate.zig index b43ac040ba84a64df10f1b54a881f2b726c5c9da..980663e9e84f08f21fa7f19a1a9e77743dc8e517 100644 --- a/src/cmd/generate.zig +++ b/src/cmd/generate.zig @@ -147,11 +147,11 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D \\ llc = true; \\ } \\ for (pkg.c_include_dirs) |item| { - \\ exe.addIncludePath(b.fmt("{s}/{s}", .{ root, item })); + \\ exe.addIncludePath(.{.path = b.fmt("{s}/{s}", .{ root, item })}); \\ llc = true; \\ } \\ for (pkg.c_source_files) |item| { - \\ exe.addCSourceFile(b.fmt("{s}/{s}", .{ root, item }), pkg.c_source_flags); + \\ exe.addCSourceFile(.{ .file = .{ .path = b.fmt("{s}/{s}", .{ root, item }) }, .flags = pkg.c_source_flags }); \\ llc = true; \\ } \\ vcpkg = vcpkg or pkg.vcpkg; diff --git a/src/cmd/init.zig b/src/cmd/init.zig index 3b1cd88dfad6862522a350d8439ead08b207e138..a472f5f4304bda4a256c321248cc4da106dc55fa 100644 --- a/src/cmd/init.zig +++ b/src/cmd/init.zig @@ -118,7 +118,7 @@ pub fn execute(args: [][]u8) !void { if (run >= 79) { const s_ind = (std.mem.lastIndexOfScalar(u8, realtext[start..end], ' ') orelse end) + start; const n_ind = (std.mem.lastIndexOfScalar(u8, realtext[start .. end - 1], '\n') orelse end) + start; - const ind = std.math.min(s_ind, n_ind); + const ind = @min(s_ind, n_ind); try w.print("{s}\n", .{realtext[start..ind]}); end = ind + 1; start = end; diff --git a/src/cmd/zpm.zig b/src/cmd/zpm.zig index 729d0ec1e7e619131dfb8d87fbea7b11a1198b15..6b560f0cf8974e0c9ae1b919704f91d4aa5393fe 100644 --- a/src/cmd/zpm.zig +++ b/src/cmd/zpm.zig @@ -55,7 +55,7 @@ pub fn execute(args: [][]u8) !void { u.fail("unknown command \"{s}\" for \"zigmod zpm\"", .{args[0]}); } -pub fn server_fetch(url: string) !std.json.ValueTree { +pub fn server_fetch(url: string) !std.json.Parsed(std.json.Value) { const req = try zfetch.Request.init(gpa, url, null); defer req.deinit(); try req.do(.GET, null, null); @@ -69,7 +69,7 @@ pub fn server_fetchArray(url: string) ![]const Package { var list = std.ArrayList(Package).init(gpa); errdefer list.deinit(); - for (val.root.array.items) |item| { + for (val.value.array.items) |item| { if (get(item, "root_file") == null) continue; try list.append(Package{ .name = item.object.get("name").?.string, @@ -78,7 +78,7 @@ pub fn server_fetchArray(url: string) ![]const Package { .tags = try valueStrArray(item.object.get("tags").?.array.items), .git = item.object.get("git").?.string, .root_file = item.object.get("root_file").?.string, - .source = @intCast(u32, item.object.get("source").?.integer), + .source = @intCast(item.object.get("source").?.integer), .links = try valueLinks(item.object.get("links").?), }); } diff --git a/src/cmd/zpm/add.zig b/src/cmd/zpm/add.zig index 4a8223637db52d7d5f4066e902d1b95536e3b881..6a8d3952c0a488867c761e65aba8cf8683e980ef 100644 --- a/src/cmd/zpm/add.zig +++ b/src/cmd/zpm/add.zig @@ -44,14 +44,14 @@ pub fn execute(args: [][]u8) !void { const _req = try zfetch.Request.init(gpa, _url, null); defer _req.deinit(); try _req.do(.GET, null, null); - break :blk _req.status.code == 200; + break :blk @intFromEnum(_req.status) == 200; }; const has_zigmodyml = blk: { const _url = try std.mem.join(gpa, "/", &.{ found.git, "blob", "HEAD", "zigmod.yml" }); const _req = try zfetch.Request.init(gpa, _url, null); defer _req.deinit(); try _req.do(.GET, null, null); - break :blk _req.status.code == 200; + break :blk @intFromEnum(_req.status) == 200; }; const file = try zigmod.ModFile.openFile(std.fs.cwd(), .{ .mode = .read_write }); diff --git a/src/cmd/zpm/tags.zig b/src/cmd/zpm/tags.zig index 05adb810c1ab3510c15a391889d9d1d716253301..167c77a6878766ec8c92ad1f96dc55399f9fdcb2 100644 --- a/src/cmd/zpm/tags.zig +++ b/src/cmd/zpm/tags.zig @@ -17,7 +17,7 @@ pub fn execute(args: [][]u8) !void { const name_col_width = blk: { var w: usize = 4; - for (val.root.array.items) |tag| { + for (val.value.array.items) |tag| { const len = tag.object.get("name").?.string.len; if (len > w) { w = len; @@ -30,7 +30,7 @@ pub fn execute(args: [][]u8) !void { try print_c_n(out, ' ', name_col_width - 4); try out.writeAll("DESCRIPTION\n"); - for (val.root.array.items) |tag| { + for (val.value.array.items) |tag| { const name = tag.object.get("name").?.string; try out.writeAll(name); try print_c_n(out, ' ', name_col_width - name.len); diff --git a/src/util/funcs.zig b/src/util/funcs.zig index ce802c2e99a45e77fae0b533157e2c1f65274a26..df25a417eae4ef877aeeaf2d7a30d5b792d7a82d 100644 --- a/src/util/funcs.zig +++ b/src/util/funcs.zig @@ -118,7 +118,7 @@ pub fn last(in: []string) !string { const alphabet = "0123456789abcdefghijklmnopqrstuvwxyz"; pub fn random_string(alloc: std.mem.Allocator, len: usize) !string { - const now = @intCast(u64, std.time.nanoTimestamp()); + const now: u64 = @intCast(std.time.nanoTimestamp()); var rand = std.rand.DefaultPrng.init(now); var r = rand.random(); var buf = try alloc.alloc(u8, len); @@ -191,8 +191,8 @@ pub fn git_rev_HEAD(alloc: std.mem.Allocator, dir: std.fs.Dir) !string { } pub fn slice(comptime T: type, input: []const T, from: usize, to: usize) []const T { - const f = std.math.max(from, 0); - const t = std.math.min(to, input.len); + const f = @max(from, 0); + const t = @min(to, input.len); return input[f..t]; } diff --git a/zig.mod b/zig.mod index 112720a3b13707098c70ba83d21465bac64eb4d7..eb25d30abcda5207bf3a00df80a45b6005de0284 100644 --- a/zig.mod +++ b/zig.mod @@ -3,13 +3,13 @@ name: zigmod main: src/lib.zig license: MIT description: A package manager for the Zig programming language. -min_zig_version: 0.11.0-dev.3620+c76ce25a6 +min_zig_version: 0.11.0 dependencies: - src: git https://github.com/nektro/zig-yaml - src: git https://github.com/nektro/zig-ansi - src: git https://github.com/ziglibs/known-folders - src: git https://github.com/nektro/zig-licenses - - src: git https://github.com/truemedian/zfetch + - src: git https://github.com/nektro/zfetch - src: git https://github.com/nektro/zig-detect-license - src: git https://github.com/nektro/zig-inquirer - src: git https://github.com/nektro/arqv-ini diff --git a/zigmod.lock b/zigmod.lock index 33a0c074583cb4f9c4d99cec83d37d223f1f3745..8180060aa9568d03af9191de979fe4c07b804ba3 100644 --- a/zigmod.lock +++ b/zigmod.lock @@ -1,19 +1,18 @@ 2 -git https://github.com/MasterQ32/zig-uri commit-d4299ad6043ad19f2ce0676687b0bff57273eae2 -git https://github.com/marlersoft/zigwin32 commit-b70e7f818d77a0c0f39b0bd9c549e16439ff5780 -git https://github.com/nektro/arqv-ini commit-ee395fd34e152d9067def609d86b7af5382b83b1 -git https://github.com/nektro/iguanaTLS commit-e70995575b397f33d798339d4f1656bcdf0ab82f -git https://github.com/nektro/zig-ansi commit-faf9585bfe5980c24748ee8a3e6a22faaa50b437 +git https://github.com/marlersoft/zigwin32 commit-007649ade45ffb544de3aafbb112de25064d3d92 +git https://github.com/nektro/arqv-ini commit-ddbe89bb0d9085e939bcbc713caeb2b7cf852bae +git https://github.com/nektro/iguanaTLS commit-c932f557865abaa1d06cd88e9b22a9f3e583fa59 +git https://github.com/nektro/zfetch commit-f51277414a2309f776fb79f3d55f26e37f9a54da +git https://github.com/nektro/zig-ansi commit-ac607e4e7ac36d46cc67c8786262578330543a36 git https://github.com/nektro/zig-detect-license commit-8f13721bd18c0e546841b6f2e11da839550d6287 -git https://github.com/nektro/zig-extras commit-ff267312e8d714c9b9d8c44ad3291f6e509dc12f +git https://github.com/nektro/zig-extras commit-54abdc5bce0b243601ef4808bce1c29e1a46cdec git https://github.com/nektro/zig-inquirer commit-5cc2a5565d04fe2c0085f0d6818590e800d9dcf7 git https://github.com/nektro/zig-leven commit-550cabd5a18ace5e67761bc5b867c10e926f4314 git https://github.com/nektro/zig-licenses commit-c9b8cbf3565675a056ad4e9b57cb4f84020e7680 git https://github.com/nektro/zig-licenses-text commit-3c07c6e4eb0965dafd0b029c632f823631b3169c git https://github.com/nektro/zig-range commit-4b2f12808aa09be4b27a163efc424dd4e0415992 -git https://github.com/nektro/zig-time commit-ca9c0e6b644d74c1d549cc2c1ee22113aa021bd8 +git https://github.com/nektro/zig-time commit-12fad367a5282827aad7e12f0e9cd36f672c4010 git https://github.com/nektro/zig-yaml commit-e56b9fed6c0afd1c4d29bedc08c3899ffe1165e9 -git https://github.com/truemedian/hzzp commit-501386e13b2f7849128f3b271d23de6127b1d9d7 -git https://github.com/truemedian/zfetch commit-829973144f680cd16be16923041fa810c1dee417 -git https://github.com/ziglibs/known-folders commit-d13ba6137084e55f873f6afb67447fe8906cc951 +git https://github.com/truemedian/hzzp commit-305aca97fce78eb3e787d57691a5eed5512bece7 +git https://github.com/ziglibs/known-folders commit-fa75e1bc672952efa0cf06160bbd942b47f6d59b git https://github.com/yaml/libyaml tag-0.2.5