diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 25c648b6c942bd3820a0f9dd831290df4855adbf..ef48dbbd7e1f5f59bcfd2dee050203d356272f52 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -20,7 +20,7 @@ jobs: uses: mlugg/setup-zig@v2 with: mirror: "http://mirrors.nektro.net/s3cgi" - version: "0.15.2" + version: "0.16.0" - run: zig version - run: zig env diff --git a/README.md b/README.md index 8b3563671016fe0d3dccee84574e0049881f6b22..6f118ceea9f49ad1e2b4c7a317b06c29e2e07caa 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ A package manager for the Zig programming language. ## Built With -- Zig `0.15.2` +- Zig `0.16.0` - See [`zig.mod`](./zig.mod) and [`zigmod.lock`](./zigmod.lock) ### Build from Source diff --git a/build.zig b/build.zig index 94c0812d4d7794ea4a917df76584095f3dfb88fe..f3a940e0114d5223351881c5ba6ef311557c8570 100644 --- a/build.zig +++ b/build.zig @@ -26,10 +26,10 @@ pub fn build(b: *std.Build) void { const exe_options = b.addOptions(); exe.root_module.addImport("build_options", exe_options.createModule()); - exe_options.addOption(string, "version", tag orelse std.mem.trimRight(u8, b.run(&.{ "git", "describe", "--tags" }), "\n")); + exe_options.addOption(string, "version", tag orelse std.mem.trimEnd(u8, b.run(&.{ "git", "describe", "--tags" }), "\n")); deps.addAllTo(exe); - exe.linkLibC(); + exe.root_module.linkSystemLibrary("c", .{}); exe.root_module.strip = strip; // exe.use_llvm = !disable_llvm; // exe.use_lld = !disable_llvm; diff --git a/deps.zig b/deps.zig index d83e8adcfdba135f1a93864aa8d6a9ce45734e6a..04666d57f19bd71a3065bf2e28a08cdd259d252d 100644 --- a/deps.zig +++ b/deps.zig @@ -27,7 +27,7 @@ pub const GitExactStep = struct { urlpath = trimPrefix(u8, urlpath, "https://"); urlpath = trimPrefix(u8, urlpath, "git://"); const repopath = b.fmt("{s}/zigmod/deps/git/{s}/{s}", .{ b.cache_root.path.?, urlpath, commit }); - flip(std.fs.cwd().access(repopath, .{})) catch return result; + flip(std.Io.Dir.cwd().access(std.Options.debug_io, repopath, .{})) catch return result; var clonestep = std.Build.Step.Run.create(b, "clone"); clonestep.addArgs(&.{ "git", "clone", "-q", "--progress", url, repopath }); @@ -55,27 +55,27 @@ pub fn fetch(exe: *std.Build.Step.Compile) *std.Build.Step { if (path.* != null) path.* = b.fmt("{s}/zigmod/deps{s}", .{ root, path.*.? }); } step.dependOn(&GitExactStep.create(b, "https://github.com/marlersoft/zigwin32", "ec98bb4d9eea532320a8551720a9e3ec6de64994").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/arqv-ini", "e229c738bbf5cf0d5464bf9178c17813069a7028").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-ansi", "d1c2ebf3f6c9b0d3aaa74a123d2f0a5657242431").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-detect-license", "e8ea5d969e1062d0be161f7a70e293b52aebc3f3").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-extras", "2cb1b3d619b10f4ad2c870f0359adb0c6129ca67").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-git", "8fdfc351842785192cad01aead798d85e25d1a48").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-inquirer", "3270255ea4c6d919853527e6a73baecfdee6867d").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-intrusive-parser", "c21ce202c557a710fba6a2333f33bee7bbea114c").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-json", "27d7354d9dc44982f1de40706721aee7d9c998a5").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-leven", "d97ef94cacf5c109b7f4b9e01a7e6645d8c8e09a").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses", "f0a95c802d6f955f131dae121550b2ec0acb97ff").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses-text", "88dc9ae4c338c652dc231ea477b8e0b56ac36743").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-nfs", "4c6b77b141abab5f6ac70ea712521f062b54df65").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-nio", "42f22d588059efa1e212f97402e94d81d675f28d").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-darwin", "3565d27455bd6c9f4650ea691cf4de47f9d229e7").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-linux", "3f07f214aac54bcf8f84975a2312cd91ac67fa04").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-time", "c05c69b92a00b1afd07cb193f5069250e34ce488").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-tracer", "afa0f6df50960f3772b4e0b311ff86521da3e6d5").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-yaml", "fbf3642e7a9e354e2f48751b69ae1c41c0d7b062").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/arqv-ini", "d2465c64833590a04bd9b7f50c87363fd03e65bf").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-ansi", "bebb39ae30d9848a1c212cee582d0b1c102d8b87").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-detect-license", "6de79b4ff8f7462e26f224f4bed3c81710c8893b").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-extras", "02301520811d7796de6e4f87961a44a6f458f702").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-git", "fec0b7e88951d866fc9196140748e95244232ea1").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-inquirer", "e745b018f87ddc4c8958370332e6cf61625403cc").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-intrusive-parser", "cf841a5bb507b03e0e8ed1877bce8b9da4b97e3f").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-json", "25dff500aea481527ea3aeaf9526e32b023326c1").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-leven", "014971d4b1e327a5c61322c3a6b9369fd1863864").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses", "bc1cd51625c13d6c7df819fd0d85968e617f5c57").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses-text", "a9d067c3c4d6c226a1de5531b66785bc15d869ee").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-nfs", "0e6c256cd96af224511210d877acef60ac07484f").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-nio", "6e45c4207fb2e1fc7fb2dbd3ecff28d2a3bfd92c").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-darwin", "b96e8bad94f53d5f426a32f237d9e8346f51b8f2").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-linux", "065090fa8b3b1aaac21ff46756116713ff5a30dd").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-time", "70ef29a006ceed7379df8801e3889da197de36ce").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-tracer", "04c3ad0fbdfb57dea27da0c8cbb75e2539837c92").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-yaml", "dff9fd43ebf1046c70090bdccfeb2e4f1c0d584b").step); step.dependOn(&GitExactStep.create(b, "https://github.com/madler/zlib", "da607da739fa6047df13e66a2af6b8bec7c2a498").step); step.dependOn(&GitExactStep.create(b, "https://github.com/yaml/libyaml", "2c891fc7a770e8ba2fec34fc6b545c672beb37e6").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/ziglibs/known-folders", "83d39161eac2ed6f37ad3cb4d9dd518696ce90bb").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/ziglibs/known-folders", "207c34a16e4365edc20d92c7892f962b3bed46e8").step); return step; } @@ -154,25 +154,25 @@ pub const Package = struct { } for (self.c_include_dirs) |item| { result.addIncludePath(.{ .cwd_relative = b.fmt("{s}/zigmod/deps{s}/{s}", .{ b.cache_root.path.?, self.store.?, item }) }); - dummy_library.addIncludePath(.{ .cwd_relative = b.fmt("{s}/zigmod/deps{s}/{s}", .{ b.cache_root.path.?, self.store.?, item }) }); + dummy_library.root_module.addIncludePath(.{ .cwd_relative = b.fmt("{s}/zigmod/deps{s}/{s}", .{ b.cache_root.path.?, self.store.?, item }) }); link_lib_c = true; links += 1; } for (self.c_source_files) |item| { - dummy_library.addCSourceFile(.{ .file = .{ .cwd_relative = b.fmt("{s}/zigmod/deps{s}/{s}", .{ b.cache_root.path.?, self.store.?, item }) }, .flags = self.c_source_flags }); + dummy_library.root_module.addCSourceFile(.{ .file = .{ .cwd_relative = b.fmt("{s}/zigmod/deps{s}/{s}", .{ b.cache_root.path.?, self.store.?, item }) }, .flags = self.c_source_flags }); links += 1; } for (self.system_libs) |item| { if (std.zig.target.isLibCLibName(&target, item)) continue; - dummy_library.linkSystemLibrary(item); + dummy_library.root_module.linkSystemLibrary(item, .{}); links += 1; } for (self.frameworks) |item| { - dummy_library.linkFramework(item); + dummy_library.root_module.linkFramework(item, .{}); links += 1; } if (links > 0) { - dummy_library.linkLibC(); + dummy_library.root_module.linkSystemLibrary("c", .{}); exe.root_module.linkLibrary(dummy_library); link_lib_c = true; } @@ -185,7 +185,7 @@ pub const Package = struct { }; fn checkMinZig(current: std.SemanticVersion, exe: *std.Build.Step.Compile) void { - const min = std.SemanticVersion.parse("0.15.2") catch return; + const min = std.SemanticVersion.parse("0.16.0") catch return; if (current.order(min).compare(.lt)) @panic(exe.step.owner.fmt("Your Zig version v{f} does not meet the minimum build requirement of v{f}", .{current, min})); } @@ -196,103 +196,103 @@ pub const package_data = struct { .entry = "/git/github.com/marlersoft/zigwin32/ec98bb4d9eea532320a8551720a9e3ec6de64994/win32.zig", }; pub var _u7sysdckdymi = Package{ - .store = "/git/github.com/nektro/arqv-ini/e229c738bbf5cf0d5464bf9178c17813069a7028", + .store = "/git/github.com/nektro/arqv-ini/d2465c64833590a04bd9b7f50c87363fd03e65bf", .name = "ini", - .entry = "/git/github.com/nektro/arqv-ini/e229c738bbf5cf0d5464bf9178c17813069a7028/src/ini.zig", + .entry = "/git/github.com/nektro/arqv-ini/d2465c64833590a04bd9b7f50c87363fd03e65bf/src/ini.zig", }; pub var _s84v9o48ucb0 = Package{ - .store = "/git/github.com/nektro/zig-ansi/d1c2ebf3f6c9b0d3aaa74a123d2f0a5657242431", + .store = "/git/github.com/nektro/zig-ansi/bebb39ae30d9848a1c212cee582d0b1c102d8b87", .name = "ansi", - .entry = "/git/github.com/nektro/zig-ansi/d1c2ebf3f6c9b0d3aaa74a123d2f0a5657242431/src/lib.zig", + .entry = "/git/github.com/nektro/zig-ansi/bebb39ae30d9848a1c212cee582d0b1c102d8b87/src/lib.zig", }; pub var _f7dubzb7cyqe = Package{ - .store = "/git/github.com/nektro/zig-extras/2cb1b3d619b10f4ad2c870f0359adb0c6129ca67", + .store = "/git/github.com/nektro/zig-extras/02301520811d7796de6e4f87961a44a6f458f702", .name = "extras", - .entry = "/git/github.com/nektro/zig-extras/2cb1b3d619b10f4ad2c870f0359adb0c6129ca67/src/lib.zig", + .entry = "/git/github.com/nektro/zig-extras/02301520811d7796de6e4f87961a44a6f458f702/src/lib.zig", }; pub var _c1xirp1ota5p = Package{ - .store = "/git/github.com/nektro/zig-inquirer/3270255ea4c6d919853527e6a73baecfdee6867d", + .store = "/git/github.com/nektro/zig-inquirer/e745b018f87ddc4c8958370332e6cf61625403cc", .name = "inquirer", - .entry = "/git/github.com/nektro/zig-inquirer/3270255ea4c6d919853527e6a73baecfdee6867d/src/lib.zig", + .entry = "/git/github.com/nektro/zig-inquirer/e745b018f87ddc4c8958370332e6cf61625403cc/src/lib.zig", .deps = &[_]*Package{ &_s84v9o48ucb0 }, }; pub var _96h80ezrvj7i = Package{ - .store = "/git/github.com/nektro/zig-leven/d97ef94cacf5c109b7f4b9e01a7e6645d8c8e09a", + .store = "/git/github.com/nektro/zig-leven/014971d4b1e327a5c61322c3a6b9369fd1863864", .name = "leven", - .entry = "/git/github.com/nektro/zig-leven/d97ef94cacf5c109b7f4b9e01a7e6645d8c8e09a/src/lib.zig", + .entry = "/git/github.com/nektro/zig-leven/014971d4b1e327a5c61322c3a6b9369fd1863864/src/lib.zig", }; pub var _0npcrzfdlrvk = Package{ - .store = "/git/github.com/nektro/zig-licenses/f0a95c802d6f955f131dae121550b2ec0acb97ff", + .store = "/git/github.com/nektro/zig-licenses/bc1cd51625c13d6c7df819fd0d85968e617f5c57", .name = "licenses", - .entry = "/git/github.com/nektro/zig-licenses/f0a95c802d6f955f131dae121550b2ec0acb97ff/src/lib.zig", + .entry = "/git/github.com/nektro/zig-licenses/bc1cd51625c13d6c7df819fd0d85968e617f5c57/src/lib.zig", }; pub var _pt88y5d80m25 = Package{ - .store = "/git/github.com/nektro/zig-licenses-text/88dc9ae4c338c652dc231ea477b8e0b56ac36743", + .store = "/git/github.com/nektro/zig-licenses-text/a9d067c3c4d6c226a1de5531b66785bc15d869ee", .name = "licenses-text", - .entry = "/git/github.com/nektro/zig-licenses-text/88dc9ae4c338c652dc231ea477b8e0b56ac36743/src/lib.zig", + .entry = "/git/github.com/nektro/zig-licenses-text/a9d067c3c4d6c226a1de5531b66785bc15d869ee/src/lib.zig", }; pub var _73bukkeci2u6 = Package{ - .store = "/git/github.com/nektro/zig-sys-darwin/3565d27455bd6c9f4650ea691cf4de47f9d229e7", + .store = "/git/github.com/nektro/zig-sys-darwin/b96e8bad94f53d5f426a32f237d9e8346f51b8f2", .name = "sys-darwin", - .entry = "/git/github.com/nektro/zig-sys-darwin/3565d27455bd6c9f4650ea691cf4de47f9d229e7/sys_darwin.zig", + .entry = "/git/github.com/nektro/zig-sys-darwin/b96e8bad94f53d5f426a32f237d9e8346f51b8f2/sys_darwin.zig", }; pub var _h7tv7ayhffak = Package{ - .store = "/git/github.com/nektro/zig-sys-linux/3f07f214aac54bcf8f84975a2312cd91ac67fa04", + .store = "/git/github.com/nektro/zig-sys-linux/065090fa8b3b1aaac21ff46756116713ff5a30dd", .name = "sys-linux", - .entry = "/git/github.com/nektro/zig-sys-linux/3f07f214aac54bcf8f84975a2312cd91ac67fa04/mod.zig", + .entry = "/git/github.com/nektro/zig-sys-linux/065090fa8b3b1aaac21ff46756116713ff5a30dd/mod.zig", }; pub var _kscsl0145t7x = Package{ - .store = "/git/github.com/nektro/zig-nio/42f22d588059efa1e212f97402e94d81d675f28d", + .store = "/git/github.com/nektro/zig-nio/6e45c4207fb2e1fc7fb2dbd3ecff28d2a3bfd92c", .name = "nio", - .entry = "/git/github.com/nektro/zig-nio/42f22d588059efa1e212f97402e94d81d675f28d/nio.zig", + .entry = "/git/github.com/nektro/zig-nio/6e45c4207fb2e1fc7fb2dbd3ecff28d2a3bfd92c/nio.zig", .deps = &[_]*Package{ &_h7tv7ayhffak, &_f7dubzb7cyqe, &_73bukkeci2u6 }, }; pub var _7l3oxw6nqqws = Package{ - .store = "/git/github.com/nektro/zig-intrusive-parser/c21ce202c557a710fba6a2333f33bee7bbea114c", + .store = "/git/github.com/nektro/zig-intrusive-parser/cf841a5bb507b03e0e8ed1877bce8b9da4b97e3f", .name = "intrusive-parser", - .entry = "/git/github.com/nektro/zig-intrusive-parser/c21ce202c557a710fba6a2333f33bee7bbea114c/intrusive_parser.zig", + .entry = "/git/github.com/nektro/zig-intrusive-parser/cf841a5bb507b03e0e8ed1877bce8b9da4b97e3f/intrusive_parser.zig", .deps = &[_]*Package{ &_f7dubzb7cyqe, &_kscsl0145t7x }, }; pub var _iecwp4b3bsfm = Package{ - .store = "/git/github.com/nektro/zig-time/c05c69b92a00b1afd07cb193f5069250e34ce488", + .store = "/git/github.com/nektro/zig-time/70ef29a006ceed7379df8801e3889da197de36ce", .name = "time", - .entry = "/git/github.com/nektro/zig-time/c05c69b92a00b1afd07cb193f5069250e34ce488/time.zig", + .entry = "/git/github.com/nektro/zig-time/70ef29a006ceed7379df8801e3889da197de36ce/time.zig", .deps = &[_]*Package{ &_f7dubzb7cyqe, &_h7tv7ayhffak, &_73bukkeci2u6 }, }; pub var _vph9l0hxpeze = Package{ - .store = "/git/github.com/nektro/zig-nfs/4c6b77b141abab5f6ac70ea712521f062b54df65", + .store = "/git/github.com/nektro/zig-nfs/0e6c256cd96af224511210d877acef60ac07484f", .name = "nfs", - .entry = "/git/github.com/nektro/zig-nfs/4c6b77b141abab5f6ac70ea712521f062b54df65/nfs.zig", + .entry = "/git/github.com/nektro/zig-nfs/0e6c256cd96af224511210d877acef60ac07484f/nfs.zig", .deps = &[_]*Package{ &_h7tv7ayhffak, &_kscsl0145t7x, &_iecwp4b3bsfm, &_73bukkeci2u6 }, }; pub var _2ovav391ivak = Package{ - .store = "/git/github.com/nektro/zig-detect-license/e8ea5d969e1062d0be161f7a70e293b52aebc3f3", + .store = "/git/github.com/nektro/zig-detect-license/6de79b4ff8f7462e26f224f4bed3c81710c8893b", .name = "detect-license", - .entry = "/git/github.com/nektro/zig-detect-license/e8ea5d969e1062d0be161f7a70e293b52aebc3f3/src/lib.zig", + .entry = "/git/github.com/nektro/zig-detect-license/6de79b4ff8f7462e26f224f4bed3c81710c8893b/src/lib.zig", .deps = &[_]*Package{ &_pt88y5d80m25, &_96h80ezrvj7i, &_vph9l0hxpeze }, }; pub var _ede2wygpe1iy = Package{ - .store = "/git/github.com/nektro/zig-tracer/afa0f6df50960f3772b4e0b311ff86521da3e6d5", + .store = "/git/github.com/nektro/zig-tracer/04c3ad0fbdfb57dea27da0c8cbb75e2539837c92", .name = "tracer", - .entry = "/git/github.com/nektro/zig-tracer/afa0f6df50960f3772b4e0b311ff86521da3e6d5/src/mod.zig", + .entry = "/git/github.com/nektro/zig-tracer/04c3ad0fbdfb57dea27da0c8cbb75e2539837c92/src/mod.zig", .deps = &[_]*Package{ &_f7dubzb7cyqe, &_h7tv7ayhffak, &_vph9l0hxpeze, &_kscsl0145t7x, &_iecwp4b3bsfm }, }; pub var _0k64oe2nuzvj = Package{ - .store = "/git/github.com/nektro/zig-git/8fdfc351842785192cad01aead798d85e25d1a48", + .store = "/git/github.com/nektro/zig-git/fec0b7e88951d866fc9196140748e95244232ea1", .name = "git", - .entry = "/git/github.com/nektro/zig-git/8fdfc351842785192cad01aead798d85e25d1a48/git.zig", + .entry = "/git/github.com/nektro/zig-git/fec0b7e88951d866fc9196140748e95244232ea1/git.zig", .deps = &[_]*Package{ &_iecwp4b3bsfm, &_f7dubzb7cyqe, &_ede2wygpe1iy, &_vph9l0hxpeze, &_kscsl0145t7x, &_0e2d06bb494b }, }; pub var _ocmr9rtohgcc = Package{ - .store = "/git/github.com/nektro/zig-json/27d7354d9dc44982f1de40706721aee7d9c998a5", + .store = "/git/github.com/nektro/zig-json/25dff500aea481527ea3aeaf9526e32b023326c1", .name = "json", - .entry = "/git/github.com/nektro/zig-json/27d7354d9dc44982f1de40706721aee7d9c998a5/json.zig", + .entry = "/git/github.com/nektro/zig-json/25dff500aea481527ea3aeaf9526e32b023326c1/json.zig", .deps = &[_]*Package{ &_f7dubzb7cyqe, &_ede2wygpe1iy, &_7l3oxw6nqqws, &_kscsl0145t7x }, }; pub var _g982zq6e8wsv = Package{ - .store = "/git/github.com/nektro/zig-yaml/fbf3642e7a9e354e2f48751b69ae1c41c0d7b062", + .store = "/git/github.com/nektro/zig-yaml/dff9fd43ebf1046c70090bdccfeb2e4f1c0d584b", .name = "yaml", - .entry = "/git/github.com/nektro/zig-yaml/fbf3642e7a9e354e2f48751b69ae1c41c0d7b062/yaml.zig", + .entry = "/git/github.com/nektro/zig-yaml/dff9fd43ebf1046c70090bdccfeb2e4f1c0d584b/yaml.zig", .deps = &[_]*Package{ &_8mdbh0zuneb0 }, }; pub var _0e2d06bb494b = Package{ @@ -308,9 +308,9 @@ pub const package_data = struct { .c_source_flags = &.{ "-DYAML_VERSION_MAJOR=0", "-DYAML_VERSION_MINOR=2", "-DYAML_VERSION_PATCH=5", "-DYAML_VERSION_STRING=\"0.2.5\"", "-DYAML_DECLARE_STATIC=1" }, }; pub var _2ta738wrqbaq = Package{ - .store = "/git/github.com/ziglibs/known-folders/83d39161eac2ed6f37ad3cb4d9dd518696ce90bb", + .store = "/git/github.com/ziglibs/known-folders/207c34a16e4365edc20d92c7892f962b3bed46e8", .name = "known-folders", - .entry = "/git/github.com/ziglibs/known-folders/83d39161eac2ed6f37ad3cb4d9dd518696ce90bb/known-folders.zig", + .entry = "/git/github.com/ziglibs/known-folders/207c34a16e4365edc20d92c7892f962b3bed46e8/known-folders.zig", }; pub var _89ujp8gq842x = Package{ .name = "zigmod", diff --git a/docs/README.md b/docs/README.md index 85c11da2659f6a7b109b85ee4e5b5f0ea5b11257..c6fe38c62e20fead5b27b40cc0b416ddbb81a3ef 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.15.2`. +The earliest Zig release this Zigmod was verified to work with is `0.16.0`. ## Download You may download a precompiled binary from https://github.com/nektro/zigmod/releases or build the project from source. diff --git a/docs/commands/install.md b/docs/commands/install.md index 7c09d6e75b94ba0c5a6a78475a0ff8717e60ca8f..31c4afd7c9092f92b05e815a3fa88a0f9ac8be53 100644 --- a/docs/commands/install.md +++ b/docs/commands/install.md @@ -19,6 +19,6 @@ zigmod install [git|hg|http] [url] ``` $ zigmod install git https://github.com/nektro/zigmod debug: modpath: /home/me/.cache/zigmod/deps/git/github.com/nektro/zigmod -debug: argv: { /home/me/.local/share/zig/0.15.2/zig, build, --prefix, /home/me/.zigmod } +debug: argv: { /home/me/.local/share/zig/0.16.0/zig, build, --prefix, /home/me/.zigmod } info: success! ``` diff --git a/src/cmd/ci.zig b/src/cmd/ci.zig index 87df53204c6e053f44ce109846af7986df0b07ee..333a60b620198c45b03e98c63ff73210f8ba8b43 100644 --- a/src/cmd/ci.zig +++ b/src/cmd/ci.zig @@ -9,7 +9,7 @@ const common = @import("./../common.zig"); // Inspired by: // https://docs.npmjs.com/cli/v7/commands/npm-ci -pub fn execute(self_name: []const u8, args: [][:0]u8) !void { +pub fn execute(self_name: []const u8, args: []const [:0]const u8) !void { _ = self_name; _ = args; diff --git a/src/cmd/explain.zig b/src/cmd/explain.zig index 8fae7a04d227357df01bedd87d15946b6b60c3a2..9a5e04f92f22756ca35c84bcc3c287e7baa5370a 100644 --- a/src/cmd/explain.zig +++ b/src/cmd/explain.zig @@ -10,7 +10,7 @@ const common = @import("./../common.zig"); // // -pub fn execute(self_name: []const u8, args: [][:0]u8) !void { +pub fn execute(self_name: []const u8, args: []const [:0]const u8) !void { _ = self_name; const gpa = std.heap.c_allocator; diff --git a/src/cmd/fetch.0.12.zig b/src/cmd/fetch.0.12.zig index a7e389ac6079096c9c108e889b4a195055c3ed3a..06af5eecdafefc783f5c3fd73ea92138aa44723b 100644 --- a/src/cmd/fetch.0.12.zig +++ b/src/cmd/fetch.0.12.zig @@ -260,7 +260,7 @@ fn print_dirs(w: nfs.File, list: []const zigmod.Module, alloc: std.mem.Allocator continue; } if (std.mem.eql(u8, mod.clean_path, "../..")) { - const cwd_realpath = try std.fs.cwd().realpathAlloc(alloc, "."); + const cwd_realpath = try nfs.cwd().realpathAlloc(alloc, "."); try w.print(" pub const _{s} = \"{}\";\n", .{ mod.short_id(), u.altStringEscape(cwd_realpath) }); continue; } diff --git a/src/cmd/fetch.0.13.zig b/src/cmd/fetch.0.13.zig index fd28c19a0ea64fdab8fb7e5c9d7517761680a102..17b641d82451f05620fb5daf9b1a52d454164f26 100644 --- a/src/cmd/fetch.0.13.zig +++ b/src/cmd/fetch.0.13.zig @@ -262,7 +262,7 @@ fn print_dirs(w: nfs.File, list: []const zigmod.Module, alloc: std.mem.Allocator continue; } if (std.mem.eql(u8, mod.clean_path, "../..")) { - const cwd_realpath = try std.fs.cwd().realpathAlloc(alloc, "."); + const cwd_realpath = try nfs.cwd().realpathAlloc(alloc, "."); try w.print(" pub const _{s} = \"{}\";\n", .{ mod.short_id(), u.altStringEscape(cwd_realpath) }); continue; } diff --git a/src/cmd/fetch.0.15.zig b/src/cmd/fetch.0.15.zig new file mode 100644 index 0000000000000000000000000000000000000000..6f61db0066385a9f60e7634120beafc137d60afc --- /dev/null +++ b/src/cmd/fetch.0.15.zig @@ -0,0 +1,427 @@ +const std = @import("std"); +const string = []const u8; +const ansi = @import("ansi"); +const extras = @import("extras"); +const nfs = @import("nfs"); + +const zigmod = @import("../lib.zig"); +const u = @import("./../util/funcs.zig"); +const common = @import("./../common.zig"); +const license = @import("./license.zig"); + +pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: nfs.Dir, top_module: zigmod.Module, list: *std.array_list.Managed(zigmod.Module)) !void { + const f = try dir.createFile("deps.zig", .{}); + defer f.close(); + + const w = f; + try w.writeAll("// zig fmt: off\n"); + try w.writeAll("const std = @import(\"std\");\n"); + try w.writeAll("const builtin = @import(\"builtin\");\n"); + try w.writeAll("const string = []const u8;\n"); + try w.writeAll("\n"); + try w.print("pub const cache = \"{}\";\n", .{u.altStringEscape(cachepath)}); + try w.writeAll("pub var skip_libc = false;\n"); + try w.writeAll("\n"); + try w.writeAll( + \\pub fn addAllTo(exe: *std.Build.Step.Compile) void { + \\ checkMinZig(builtin.zig_version, exe); + \\ @setEvalBranchQuota(1_000_000); + \\ for (packages) |pkg| { + \\ const module = pkg.module(exe); + \\ exe.root_module.addImport(pkg.import.?[0], module); + \\ } + \\ for (package_data._root.system_libs) |libname| { + \\ exe.linkSystemLibrary(libname); + \\ exe.linkLibC(); + \\ } + \\ // clear module memo cache so addAllTo can be called more than once in the same build.zig + \\ module_memo.clearAndFree(exe.step.owner.allocator); + \\} + \\ + \\var link_lib_c = false; + \\var module_memo: std.StringArrayHashMapUnmanaged(*std.Build.Module) = .empty; + \\pub const Package = struct { + \\ id: string, + \\ directory: string, + \\ import: ?struct { string, std.Build.LazyPath } = null, + \\ dependencies: []const *const Package, + \\ c_include_dirs: []const string = &.{}, + \\ c_source_files: []const string = &.{}, + \\ c_source_flags: []const string = &.{}, + \\ system_libs: []const string = &.{}, + \\ frameworks: []const string = &.{}, + \\ + \\ pub fn module(self: *const Package, exe: *std.Build.Step.Compile) *std.Build.Module { + \\ if (module_memo.get(self.id)) |cached| { + \\ return cached; + \\ } + \\ const b = exe.step.owner; + \\ const result = b.createModule(.{ + \\ .target = exe.root_module.resolved_target, + \\ }); + \\ const target = result.resolved_target.?.result; + \\ if (self.import) |capture| { + \\ result.root_source_file = capture[1]; + \\ } + \\ for (self.dependencies) |item| { + \\ const module_dep = item.module(exe); + \\ if (module_dep.root_source_file != null) { + \\ result.addImport(item.import.?[0], module_dep); + \\ } + \\ for (module_dep.include_dirs.items) |jtem| { + \\ switch (jtem) { + \\ .path => result.addIncludePath(jtem.path), + \\ .path_system, .path_after, .framework_path, .framework_path_system, .other_step, .config_header_step => {}, + \\ .embed_path => {}, + \\ } + \\ } + \\ } + \\ for (self.c_include_dirs) |item| { + \\ result.addIncludePath(.{ .cwd_relative = (b.fmt("{s}/{s}", .{ self.directory, item })) }); + \\ exe.addIncludePath(.{ .cwd_relative = (b.fmt("{s}/{s}", .{ self.directory, item })) }); + \\ link_lib_c = true; + \\ } + \\ for (self.c_source_files) |item| { + \\ exe.addCSourceFile(.{ .file = .{ .cwd_relative = (b.fmt("{s}/{s}", .{ self.directory, item })) }, .flags = self.c_source_flags }); + \\ link_lib_c = true; + \\ } + \\ for (self.system_libs) |item| { + \\ if (skip_libc and std.zig.target.isLibCLibName(&target, item)) continue; + \\ result.linkSystemLibrary(item, .{}); + \\ exe.linkSystemLibrary(item); + \\ link_lib_c = true; + \\ } + \\ for (self.frameworks) |item| { + \\ result.linkFramework(item, .{}); + \\ exe.linkFramework(item); + \\ link_lib_c = true; + \\ } + \\ if (link_lib_c and !skip_libc) { + \\ result.link_libc = true; + \\ exe.linkLibC(); + \\ } + \\ module_memo.putNoClobber(b.allocator, self.id, result) catch @panic("OOM"); + \\ return result; + \\ } + \\}; + \\ + \\ + ); + + try w.print( + \\fn checkMinZig(current: std.SemanticVersion, exe: *std.Build.Step.Compile) void {{ + \\ const min = std.SemanticVersion.parse("{?}") catch return; + \\ if (current.order(min).compare(.lt)) @panic(exe.step.owner.fmt("Your Zig version v{{f}} does not meet the minimum build requirement of v{{f}}", .{{current, min}})); + \\}} + \\ + \\ + , .{if (top_module.minZigVersion()) |sv| u.altSemanticVersion(sv) else null}); + + try w.writeAll("pub const dirs = struct {\n"); + try print_dirs(w, list.items, alloc); + try w.writeAll("};\n\n"); + + try w.writeAll("pub const package_data = struct {\n"); + var duped = std.array_list.Managed(zigmod.Module).init(alloc); + var done = std.array_list.Managed(zigmod.Module).init(alloc); + for (list.items) |mod| { + if (mod.type == .system_lib or mod.type == .framework) { + continue; + } + try duped.append(mod); + } + try print_pkg_data_to(w, &duped, &done); + try w.writeAll("};\n\n"); + + try w.writeAll("pub const packages = "); + try print_deps(w, top_module); + try w.writeAll(";\n\n"); + + try w.writeAll("pub const pkgs = "); + try print_pkgs(alloc, w, top_module); + try w.writeAll(";\n\n"); + + try w.writeAll("pub const imports = struct {\n"); + try print_imports(alloc, w, top_module, cachepath); + try w.writeAll("};\n"); +} + +fn create_lockfile(alloc: std.mem.Allocator, list: *std.array_list.Managed(zigmod.Module), path: string, dir: nfs.Dir) !void { + const fl = try dir.createFile("zigmod.lock", .{}); + defer fl.close(); + + std.mem.sort(zigmod.Module, list.items, {}, zigmod.Module.lessThan); + + const wl = fl; + try wl.writeAll("2\n"); + for (list.items) |m| { + if (m.dep) |md| { + if (md.type.isLocal()) continue; + const mpath = try std.fs.path.joinZ(alloc, &.{ path, m.clean_path }); + const version = try md.exact_version(alloc, mpath); + try wl.print("{s} {s} {s}\n", .{ @tagName(md.type), md.path, version }); + } + } +} + +const DiffChange = struct { + from: string, + to: string, +}; + +fn diff_lockfile(alloc: std.mem.Allocator) !void { + const max = std.math.maxInt(usize); + + if (try nfs.cwd().existsDir(".git")) { + const result = try u.run_cmd_raw(alloc, null, &.{ "git", "diff", "zigmod.lock" }); + var stdout = std.io.fixedBufferStream(result.stdout); + const r = stdout.reader(); + while (try r.readUntilDelimiterOrEofAlloc(alloc, '\n', max)) |line| { + if (std.mem.startsWith(u8, line, "@@")) break; + } + + var rems = std.array_list.Managed(string).init(alloc); + var adds = std.array_list.Managed(string).init(alloc); + while (try r.readUntilDelimiterOrEofAlloc(alloc, '\n', max)) |line_full| { + const line = line_full[0 .. line_full.len - 1]; + if (line[0] == ' ') continue; + if (line[0] == '-') try rems.append(line[1..]); + if (line[0] == '+') if (line[1] == '2') break else try adds.append(line[1..]); + } + + var changes = std.StringHashMap(DiffChange).init(alloc); + + var didbreak = false; + var i: usize = 0; + while (i < rems.items.len) { + const it = rems.items[i]; + const sni = u.indexOfN(it, ' ', 2).?; + + var j: usize = 0; + while (j < adds.items.len) { + const jt = adds.items[j]; + const snj = u.indexOfN(jt, ' ', 2).?; + + if (std.mem.eql(u8, it[0..sni], jt[0..snj])) { + try changes.put(it[0..sni], .{ + .from = it[u.indexOfAfter(it, '-', sni).? + 1 .. it.len], + .to = jt[u.indexOfAfter(jt, '-', snj).? + 1 .. jt.len], + }); + _ = rems.orderedRemove(i); + _ = adds.orderedRemove(j); + didbreak = true; + break; + } + if (!didbreak) j += 1; + } + if (!didbreak) i += 1; + if (didbreak) didbreak = false; + } + + if (adds.items.len > 0) { + std.debug.print(comptime ansi.color.Faint("Newly added packages:\n"), .{}); + defer std.debug.print("\n", .{}); + + for (adds.items) |it| { + std.debug.print("- {s}\n", .{it}); + } + } + + if (rems.items.len > 0) { + std.debug.print(comptime ansi.color.Faint("Removed packages:\n"), .{}); + defer std.debug.print("\n", .{}); + + for (rems.items) |it| { + std.debug.print("- {s}\n", .{it}); + } + } + + if (changes.unmanaged.size > 0) std.debug.print(comptime ansi.color.Faint("Updated packages:\n"), .{}); + var iter = changes.iterator(); + while (iter.next()) |it| { + if (diff_printchange("git https://github.com", "- {s}/compare/{s}...{s}\n", it)) continue; + if (diff_printchange("git https://gitlab.com", "- {s}/-/compare/{s}...{s}\n", it)) continue; + if (diff_printchange("git https://gitea.com", "- {s}/compare/{s}...{s}\n", it)) continue; + + std.debug.print("- {s}\n", .{it.key_ptr.*}); + std.debug.print(" - {s} ... {s}\n", .{ it.value_ptr.from, it.value_ptr.to }); + } + } +} + +fn diff_printchange(comptime testt: string, comptime replacement: string, item: std.StringHashMap(DiffChange).Entry) bool { + if (std.mem.startsWith(u8, item.key_ptr.*, testt)) { + if (std.mem.eql(u8, item.value_ptr.from, item.value_ptr.to)) return true; + std.debug.print(replacement, .{ item.key_ptr.*[4..], item.value_ptr.from, item.value_ptr.to }); + return true; + } + return false; +} + +fn print_dirs(w: nfs.File, list: []const zigmod.Module, alloc: std.mem.Allocator) !void { + for (list) |mod| { + if (mod.type == .system_lib or mod.type == .framework) continue; + if (std.mem.eql(u8, &mod.id, &zigmod.Module.ROOT)) { + try w.writeAll(" pub const _root = \"\";\n"); + continue; + } + if (std.mem.eql(u8, mod.clean_path, "../..")) { + const cwd_realpath = try nfs.cwd().realpathAlloc(alloc, "."); + try w.print(" pub const _{s} = \"{}\";\n", .{ mod.short_id(), u.altStringEscape(cwd_realpath) }); + continue; + } + try w.print(" pub const _{s} = cache ++ \"/{}\";\n", .{ mod.short_id(), u.altStringEscape(mod.clean_path) }); + } +} + +fn print_deps(w: nfs.File, m: zigmod.Module) !void { + try w.writeAll("&[_]*const Package{\n"); + for (m.deps) |d| { + if (d.main.len == 0) { + continue; + } + if (d.for_build) { + continue; + } + try w.print(" &package_data._{s},\n", .{d.id[0..12]}); + } + try w.writeAll("}"); +} + +fn print_pkg_data_to(w: nfs.File, notdone: *std.array_list.Managed(zigmod.Module), done: *std.array_list.Managed(zigmod.Module)) !void { + var len: usize = notdone.items.len; + while (notdone.items.len > 0) { + for (notdone.items, 0..) |mod, i| { + if (contains_all(mod.deps, done.items)) { + try w.print( + \\ pub const _{s} = Package{{ + \\ .id = "{s}", + \\ .directory = dirs._{s}, + \\ + , .{ + mod.short_id(), + mod.short_id(), + mod.short_id(), + }); + if (mod.main.len > 0 and !std.mem.eql(u8, &mod.id, &zigmod.Module.ROOT)) { + try w.print( + \\ .import = .{{ "{s}", .{{ .cwd_relative = dirs._{s} ++ "/{s}" }} }}, + \\ + , .{ + mod.name, + mod.short_id(), + mod.main, + }); + } + { + try w.writeAll(" .dependencies ="); + try w.writeAll(" &.{"); + for (mod.deps, 0..) |moddep, j| { + if (moddep.type == .system_lib) continue; + if (moddep.type == .framework) continue; + try w.print(" &_{s}", .{moddep.id[0..12]}); + if (j != mod.deps.len - 1) try w.writeAll(","); + } + try w.writeAll(" },\n"); + } + if (mod.c_include_dirs.len > 0) { + try w.writeAll(" .c_include_dirs = &.{"); + for (mod.c_include_dirs, 0..) |item, j| { + try w.print(" \"{}\"", .{u.altStringEscape(item)}); + if (j != mod.c_include_dirs.len - 1) try w.writeAll(","); + } + try w.writeAll(" },\n"); + } + if (mod.c_source_files.len > 0) { + try w.writeAll(" .c_source_files = &.{"); + for (mod.c_source_files, 0..) |item, j| { + try w.print(" \"{}\"", .{u.altStringEscape(item)}); + if (j != mod.c_source_files.len - 1) try w.writeAll(","); + } + try w.writeAll(" },\n"); + } + if (mod.c_source_flags.len > 0) { + try w.writeAll(" .c_source_flags = &.{"); + for (mod.c_source_flags, 0..) |item, j| { + try w.print(" \"{}\"", .{u.altStringEscape(item)}); + if (j != mod.c_source_flags.len - 1) try w.writeAll(","); + } + try w.writeAll(" },\n"); + } + if (mod.has_syslib_deps()) { + try w.writeAll(" .system_libs = &.{"); + for (mod.deps, 0..) |item, j| { + if (!(item.type == .system_lib)) continue; + try w.print(" \"{}\"", .{u.altStringEscape(item.name)}); + if (j != mod.deps.len - 1) try w.writeAll(","); + } + try w.writeAll(" },\n"); + } + if (mod.has_framework_deps()) { + try w.writeAll(" .frameworks = &.{"); + for (mod.deps, 0..) |item, j| { + if (!(item.type == .system_lib)) continue; + try w.print(" \"{}\"", .{u.altStringEscape(item.name)}); + if (j != mod.deps.len - 1) try w.writeAll(","); + } + try w.writeAll(" },\n"); + } + try w.writeAll(" };\n"); + + try done.append(mod); + _ = notdone.orderedRemove(i); + break; + } + } + if (notdone.items.len == len) { + u.fail("notdone still has {d} items", .{len}); + } + len = notdone.items.len; + } +} + +/// returns if all of the zig modules in needles are in haystack +fn contains_all(needles: []zigmod.Module, haystack: []const zigmod.Module) bool { + for (needles) |item| { + if (item.main.len > 0 and !extras.containsAggregate(zigmod.Module, haystack, item)) { + return false; + } + } + return true; +} + +fn print_pkgs(alloc: std.mem.Allocator, w: nfs.File, m: zigmod.Module) !void { + try w.writeAll("struct {\n"); + for (m.deps) |d| { + if (d.main.len == 0) { + continue; + } + if (d.for_build) { + continue; + } + const ident = try zig_name_from_pkg_name(alloc, d.name); + try w.print(" pub const {s} = &package_data._{s};\n", .{ ident, d.id[0..12] }); + } + try w.writeAll("}"); +} + +fn print_imports(alloc: std.mem.Allocator, w: nfs.File, m: zigmod.Module, path: string) !void { + for (m.deps) |d| { + if (d.main.len == 0) { + continue; + } + if (!d.for_build) { + continue; + } + const ident = try zig_name_from_pkg_name(alloc, d.name); + try w.print(" pub const {s} = @import(\"{}/{}/{s}\");\n", .{ ident, u.altStringEscape(path), u.altStringEscape(d.clean_path), d.main }); + } +} + +fn zig_name_from_pkg_name(alloc: std.mem.Allocator, name: string) !string { + var legal = name; + legal = try std.mem.replaceOwned(u8, alloc, legal, "-", "_"); + legal = try std.mem.replaceOwned(u8, alloc, legal, "/", "_"); + legal = try std.mem.replaceOwned(u8, alloc, legal, ".", "_"); + return legal; +} diff --git a/src/cmd/fetch.zig b/src/cmd/fetch.zig index 0970f58207f8886d9cf97514d7c0d8f1e066e939..b93526b43ed12ccedee364fd04b5e462abf1fa06 100644 --- a/src/cmd/fetch.zig +++ b/src/cmd/fetch.zig @@ -3,6 +3,7 @@ const string = []const u8; const ansi = @import("ansi"); const extras = @import("extras"); const nfs = @import("nfs"); +const nio = @import("nio"); const zigmod = @import("../lib.zig"); const u = @import("./../util/funcs.zig"); @@ -12,7 +13,7 @@ const license = @import("./license.zig"); // // -pub fn execute(self_name: []const u8, args: [][:0]u8) !void { +pub fn execute(self_name: []const u8, args: []const [:0]const u8) !void { _ = self_name; const gpa = std.heap.c_allocator; @@ -66,8 +67,8 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: nfs.Dir, \\ exe.root_module.addImport(pkg.import.?[0], module); \\ } \\ for (package_data._root.system_libs) |libname| { - \\ exe.linkSystemLibrary(libname); - \\ exe.linkLibC(); + \\ exe.root_module.linkSystemLibrary(libname, .{}); + \\ exe.root_module.link_libc = true; \\ } \\ // clear module memo cache so addAllTo can be called more than once in the same build.zig \\ module_memo.clearAndFree(exe.step.owner.allocator); @@ -113,27 +114,27 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: nfs.Dir, \\ } \\ for (self.c_include_dirs) |item| { \\ result.addIncludePath(.{ .cwd_relative = (b.fmt("{s}/{s}", .{ self.directory, item })) }); - \\ exe.addIncludePath(.{ .cwd_relative = (b.fmt("{s}/{s}", .{ self.directory, item })) }); + \\ exe.root_module.addIncludePath(.{ .cwd_relative = (b.fmt("{s}/{s}", .{ self.directory, item })) }); \\ link_lib_c = true; \\ } \\ for (self.c_source_files) |item| { - \\ exe.addCSourceFile(.{ .file = .{ .cwd_relative = (b.fmt("{s}/{s}", .{ self.directory, item })) }, .flags = self.c_source_flags }); + \\ exe.root_module.addCSourceFile(.{ .file = .{ .cwd_relative = (b.fmt("{s}/{s}", .{ self.directory, item })) }, .flags = self.c_source_flags }); \\ link_lib_c = true; \\ } \\ for (self.system_libs) |item| { \\ if (skip_libc and std.zig.target.isLibCLibName(&target, item)) continue; \\ result.linkSystemLibrary(item, .{}); - \\ exe.linkSystemLibrary(item); + \\ exe.root_module.linkSystemLibrary(item, .{}); \\ link_lib_c = true; \\ } \\ for (self.frameworks) |item| { \\ result.linkFramework(item, .{}); - \\ exe.linkFramework(item); + \\ exe.root_module.linkFramework(item, .{}); \\ link_lib_c = true; \\ } \\ if (link_lib_c and !skip_libc) { \\ result.link_libc = true; - \\ exe.linkLibC(); + \\ exe.root_module.link_libc = true; \\ } \\ module_memo.putNoClobber(b.allocator, self.id, result) catch @panic("OOM"); \\ return result; @@ -209,8 +210,8 @@ fn diff_lockfile(alloc: std.mem.Allocator) !void { if (try nfs.cwd().existsDir(".git")) { const result = try u.run_cmd_raw(alloc, null, &.{ "git", "diff", "zigmod.lock" }); - var stdout = std.io.fixedBufferStream(result.stdout); - const r = stdout.reader(); + var stdout = nio.FixedBufferStream([]const u8).init(result.stdout); + const r = &stdout; while (try r.readUntilDelimiterOrEofAlloc(alloc, '\n', max)) |line| { if (std.mem.startsWith(u8, line, "@@")) break; } diff --git a/src/cmd/generate.zig b/src/cmd/generate.zig index 15b21bc104d606306c14b1e8d174bb07d1e5e32d..8e33b68528a2b5eada9d5784a24c2fc84c8cb870 100644 --- a/src/cmd/generate.zig +++ b/src/cmd/generate.zig @@ -10,7 +10,7 @@ const common = @import("./../common.zig"); // // -pub fn execute(self_name: []const u8, args: [][:0]u8) !void { +pub fn execute(self_name: []const u8, args: []const [:0]const u8) !void { _ = self_name; // @@ -70,7 +70,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: [:0]const u8, dir: nf \\ urlpath = trimPrefix(u8, urlpath, "https://"); \\ urlpath = trimPrefix(u8, urlpath, "git://"); \\ const repopath = b.fmt("{s}/zigmod/deps/git/{s}/{s}", .{ b.cache_root.path.?, urlpath, commit }); - \\ flip(std.fs.cwd().access(repopath, .{})) catch return result; + \\ flip(std.Io.Dir.cwd().access(std.Options.debug_io, repopath, .{})) catch return result; \\ \\ var clonestep = std.Build.Step.Run.create(b, "clone"); \\ clonestep.addArgs(&.{ "git", "clone", "-q", "--progress", url, repopath }); @@ -190,25 +190,25 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: [:0]const u8, dir: nf \\ } \\ for (self.c_include_dirs) |item| { \\ result.addIncludePath(.{ .cwd_relative = b.fmt("{s}/zigmod/deps{s}/{s}", .{ b.cache_root.path.?, self.store.?, item }) }); - \\ dummy_library.addIncludePath(.{ .cwd_relative = b.fmt("{s}/zigmod/deps{s}/{s}", .{ b.cache_root.path.?, self.store.?, item }) }); + \\ dummy_library.root_module.addIncludePath(.{ .cwd_relative = b.fmt("{s}/zigmod/deps{s}/{s}", .{ b.cache_root.path.?, self.store.?, item }) }); \\ link_lib_c = true; \\ links += 1; \\ } \\ for (self.c_source_files) |item| { - \\ dummy_library.addCSourceFile(.{ .file = .{ .cwd_relative = b.fmt("{s}/zigmod/deps{s}/{s}", .{ b.cache_root.path.?, self.store.?, item }) }, .flags = self.c_source_flags }); + \\ dummy_library.root_module.addCSourceFile(.{ .file = .{ .cwd_relative = b.fmt("{s}/zigmod/deps{s}/{s}", .{ b.cache_root.path.?, self.store.?, item }) }, .flags = self.c_source_flags }); \\ links += 1; \\ } \\ for (self.system_libs) |item| { \\ if (std.zig.target.isLibCLibName(&target, item)) continue; - \\ dummy_library.linkSystemLibrary(item); + \\ dummy_library.root_module.linkSystemLibrary(item, .{}); \\ links += 1; \\ } \\ for (self.frameworks) |item| { - \\ dummy_library.linkFramework(item); + \\ dummy_library.root_module.linkFramework(item, .{}); \\ links += 1; \\ } \\ if (links > 0) { - \\ dummy_library.linkLibC(); + \\ dummy_library.root_module.linkSystemLibrary("c", .{}); \\ exe.root_module.linkLibrary(dummy_library); \\ link_lib_c = true; \\ } diff --git a/src/cmd/init.zig b/src/cmd/init.zig index b0a3262080385e25530447507b2ea0f786902b53..a2c50be1de5ba477bd7aab94462994d7e1813b99 100644 --- a/src/cmd/init.zig +++ b/src/cmd/init.zig @@ -10,6 +10,7 @@ const time = @import("time"); const extras = @import("extras"); const nio = @import("nio"); const nfs = @import("nfs"); +const root = @import("root"); const u = @import("./../util/funcs.zig"); const common = @import("./../common.zig"); @@ -18,7 +19,7 @@ const zigmod = @import("./../lib.zig"); // // -pub fn execute(self_name: []const u8, args: [][:0]u8) !void { +pub fn execute(self_name: []const u8, args: []const [:0]const u8) !void { _ = self_name; std.debug.print("This utility will walk you through creating a zigmod.yml file.\n", .{}); @@ -342,7 +343,8 @@ pub fn writeLibManifest(w: nfs.File, id: string, name: string, license: string, } fn guessCopyrightName() !?string { - const homepath = (try knownfolders.getPath(gpa, .home)).?; + const io = root.io; + const homepath = (try knownfolders.getPath(io, gpa, root.environ, .home)).?; const home = try nfs.cwd().openDirC(homepath, .{}); if (!(try home.exists(".gitconfig"))) return null; const file = try home.openFile(".gitconfig", .{}); diff --git a/src/cmd/install.zig b/src/cmd/install.zig index 367d1ae978198ed2719b4c044f3b6cfd85fa2a3c..476d5ded3a682471400c5fe4fdafee036365a15d 100644 --- a/src/cmd/install.zig +++ b/src/cmd/install.zig @@ -5,19 +5,21 @@ const knownfolders = @import("known-folders"); const extras = @import("extras"); const nio = @import("nio"); const nfs = @import("nfs"); +const root = @import("root"); const zigmod = @import("./../lib.zig"); const u = @import("./../util/funcs.zig"); const common = @import("./../common.zig"); -pub fn execute(self_name: []const u8, args: [][:0]u8) !void { +pub fn execute(self_name: []const u8, args: []const [:0]const u8) !void { _ = self_name; if (args.len < 2) u.fail("usage: zigmod install [git|hg|http] [url]", .{}); - const homepath = try knownfolders.getPath(gpa, .home) orelse u.fail("failed to read HOME", .{}); - const cache = try knownfolders.getPath(gpa, .cache) orelse u.fail("failed to read XDG_CACHE_HOME", .{}); - const datapath = try knownfolders.getPath(gpa, .data) orelse u.fail("failed to read XDG_DATA_HOME", .{}); + const io = root.io; + const homepath = try knownfolders.getPath(io, gpa, root.environ, .home) orelse u.fail("failed to read HOME", .{}); + const cache = try knownfolders.getPath(io, gpa, root.environ, .cache) orelse u.fail("failed to read XDG_CACHE_HOME", .{}); + const datapath = try knownfolders.getPath(io, gpa, root.environ, .data) orelse u.fail("failed to read XDG_DATA_HOME", .{}); const RemoteType = enum { git, @@ -86,7 +88,8 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void { 0x0000_000c => try @import("./fetch.0.12.zig").create_depszig(gpa, cachepath, moddir, fetch_top_module, &fetch_list), 0x0000_000d => try @import("./fetch.0.13.zig").create_depszig(gpa, cachepath, moddir, fetch_top_module, &fetch_list), 0x0000_000e => try @import("./fetch.0.14.zig").create_depszig(gpa, cachepath, moddir, fetch_top_module, &fetch_list), - 0x0000_000f => {}, // that's us, zigmod is already 0.15.2 + 0x0000_000f => try @import("./fetch.0.15.zig").create_depszig(gpa, cachepath, moddir, fetch_top_module, &fetch_list), + 0x0000_0010 => {}, // that's us, zigmod is already 0.16.0 else => u.fail("zig {d}.{d} unimplemented", .{ version_sct.major, version_sct.minor }), } @@ -96,14 +99,16 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void { "--prefix", try std.fs.path.join(gpa, &.{ homepath, ".zigmod" }), }; logargv(argv) catch return; - var proc = std.process.Child.init(argv, gpa); - proc.cwd = modpath; - const term = try proc.spawnAndWait(); + var proc = try std.process.spawn(io, .{ + .argv = argv, + .cwd = .{ .path = modpath }, + }); + const term = try proc.wait(io); switch (term) { - .Exited => |v| u.assert(v == 0, "zig build failed with exit code: {d}", .{v}), - .Signal => |v| u.fail("zig build was stopped with signal: {d}", .{v}), - .Stopped => |v| u.fail("zig build was stopped with code: {d}", .{v}), - .Unknown => |v| u.fail("zig build encountered unknown: {d}", .{v}), + .exited => |v| u.assert(v == 0, "zig build failed with exit code: {d}", .{v}), + .signal => |v| u.fail("zig build was stopped with signal: {d}", .{v}), + .stopped => |v| u.fail("zig build was stopped with code: {d}", .{v}), + .unknown => |v| u.fail("zig build encountered unknown: {d}", .{v}), } std.log.info("success!", .{}); } @@ -111,9 +116,13 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void { // needed this after moving to zig 0.15 // /zig/0.15.2/lib/std/Io/Writer.zig:1122:51: error: expected type '[]const u8', found '[]const []const u8' fn logargv(argv: []const []const u8) !void { + const io = std.Options.debug_io; + const prev = io.swapCancelProtection(.blocked); + defer _ = io.swapCancelProtection(prev); var buffer: [64]u8 = undefined; - const stderr = std.debug.lockStderrWriter(&buffer); - defer std.debug.unlockStderrWriter(); + const stderrterm = std.debug.lockStderr(&buffer).terminal(); + defer std.debug.unlockStderr(); + const stderr = stderrterm.writer; try stderr.writeAll("debug: argv: {"); for (argv, 0..) |v, i| { if (i > 0) try stderr.writeAll(","); diff --git a/src/cmd/license.zig b/src/cmd/license.zig index 3f8bc8b584710f4a77978402cb2db0137349c987..5e7a2dd92468bfe33ed88ebc0e7a34baa43c5c7c 100644 --- a/src/cmd/license.zig +++ b/src/cmd/license.zig @@ -11,12 +11,12 @@ const u = @import("./../util/funcs.zig"); const common = @import("./../common.zig"); const List = std.array_list.Managed(zigmod.Module); -const Map = std.StringArrayHashMap(*List); +const Map = std.array_hash_map.String(*List); // Inspired by: // https://github.com/onur/cargo-license -pub fn execute(self_name: []const u8, args: [][:0]u8) !void { +pub fn execute(self_name: []const u8, args: []const [:0]const u8) !void { _ = self_name; _ = args; @@ -40,8 +40,8 @@ pub fn do(cachepath: [:0]const u8, dir: nfs.Dir, options: *common.CollectOptions try common.collect_pkgs(top_module, &master_list); std.mem.sort(zigmod.Module, master_list.items, {}, zigmod.Module.lessThan); - var map = Map.init(gpa); - errdefer map.deinit(); + var map = Map{}; + errdefer map.deinit(gpa); var unspecified_list = List.init(gpa); errdefer unspecified_list.deinit(); @@ -62,7 +62,7 @@ pub fn do(cachepath: [:0]const u8, dir: nfs.Dir, options: *common.CollectOptions try unspecified_list.append(item); continue; } - const map_item = try map.getOrPut(license_code); + const map_item = try map.getOrPut(gpa, license_code); if (!map_item.found_existing) { const temp = try gpa.create(List); temp.* = List.init(gpa); diff --git a/src/cmd/sum.zig b/src/cmd/sum.zig index e1765d21d325e57241414efd8ea7f4ad26ef86a7..7247c9d1d584564f47898d189589d865f917f1ec 100644 --- a/src/cmd/sum.zig +++ b/src/cmd/sum.zig @@ -9,7 +9,7 @@ const common = @import("./../common.zig"); // // -pub fn execute(self_name: []const u8, args: [][:0]u8) !void { +pub fn execute(self_name: []const u8, args: []const [:0]const u8) !void { _ = self_name; _ = args; diff --git a/src/cmd/version.zig b/src/cmd/version.zig index 8dc9d4bb8cd16c90362759d4579e1a95a293d259..f656e1ba958da6b33265abe819e2c79797d67acf 100644 --- a/src/cmd/version.zig +++ b/src/cmd/version.zig @@ -8,7 +8,7 @@ const u = @import("./../util/funcs.zig"); // // -pub fn execute(self_name: []const u8, args: [][:0]u8) !void { +pub fn execute(self_name: []const u8, args: []const [:0]const u8) !void { _ = self_name; _ = args; diff --git a/src/cmd/zpm.zig b/src/cmd/zpm.zig index 2bde076f8be4dae5b82b9b249d588b93627b65e8..c302da1c0c16a340e04e6b2f23e9b6e7c1b78b99 100644 --- a/src/cmd/zpm.zig +++ b/src/cmd/zpm.zig @@ -4,6 +4,7 @@ const gpa = std.heap.c_allocator; const extras = @import("extras"); const json = @import("json"); const nio = @import("nio"); +const root = @import("root"); const u = @import("./../util/funcs.zig"); @@ -30,7 +31,7 @@ pub const Package = struct { links: []const string, }; -pub fn execute(self_name: []const u8, args: [][:0]u8) !void { +pub fn execute(self_name: []const u8, args: []const [:0]const u8) !void { if (args.len == 0) { std.debug.print("{s}\n", .{ \\This is a subcommand for use with https://github.com/zigtools/zpm-server instances but has no default behavior on its own aside from showing you this nice help text. @@ -57,8 +58,9 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void { } pub fn server_fetch(url: string) !json.Document { + const io = root.io; var buf: [4096]u8 = @splat(0); - var client: std.http.Client = .{ .allocator = gpa }; + var client: std.http.Client = .{ .io = io, .allocator = gpa }; defer client.deinit(); var req = try client.request(.GET, try std.Uri.parse(url), .{ diff --git a/src/cmd/zpm/add.zig b/src/cmd/zpm/add.zig index 74ff03b4372660ab632fa22c920c77a08c28ced8..1a6d2813c40d6fb878d69fbd0ec51b81287283e5 100644 --- a/src/cmd/zpm/add.zig +++ b/src/cmd/zpm/add.zig @@ -2,6 +2,7 @@ const std = @import("std"); const gpa = std.heap.c_allocator; const extras = @import("extras"); const nfs = @import("nfs"); +const root = @import("root"); const zigmod = @import("../../lib.zig"); const u = @import("./../../util/funcs.zig"); @@ -10,7 +11,7 @@ const zpm = @import("./../zpm.zig"); // // -pub fn execute(self_name: []const u8, args: [][:0]u8) !void { +pub fn execute(self_name: []const u8, args: []const [:0]const u8) !void { _ = self_name; const url = try std.mem.join(gpa, "/", &.{ zpm.server_root, "packages" }); @@ -42,8 +43,9 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void { } } + const io = root.io; // var buf: [4096]u8 = @splat(0); - var client: std.http.Client = .{ .allocator = gpa }; + var client: std.http.Client = .{ .io = io, .allocator = gpa }; defer client.deinit(); const has_zigdotmod = blk: { diff --git a/src/cmd/zpm/search.zig b/src/cmd/zpm/search.zig index a4a174358f853b2eb810cff1becc6d84d37b6cde..09c22135b63519293bb521114d9169fba07bd364 100644 --- a/src/cmd/zpm/search.zig +++ b/src/cmd/zpm/search.zig @@ -8,7 +8,7 @@ const zpm = @import("./../zpm.zig"); // // -pub fn execute(self_name: []const u8, args: [][:0]u8) !void { +pub fn execute(self_name: []const u8, args: []const [:0]const u8) !void { _ = self_name; _ = args; diff --git a/src/cmd/zpm/showjson.zig b/src/cmd/zpm/showjson.zig index 9b3f89c84f494cc411f77b8380756909292cff2d..bcd63c15d48946472bc1796610ce44f6ddebb61b 100644 --- a/src/cmd/zpm/showjson.zig +++ b/src/cmd/zpm/showjson.zig @@ -7,7 +7,7 @@ const zpm = @import("./../zpm.zig"); // // -pub fn execute(self_name: []const u8, args: [][:0]u8) !void { +pub fn execute(self_name: []const u8, args: []const [:0]const u8) !void { _ = self_name; const out = nfs.stdout(); diff --git a/src/cmd/zpm/tags.zig b/src/cmd/zpm/tags.zig index e311084ccbb61ed84e2d72da9cc7a3ae308a636e..076835b4c437b51cbc022c82f5f4016037f32cbd 100644 --- a/src/cmd/zpm/tags.zig +++ b/src/cmd/zpm/tags.zig @@ -8,7 +8,7 @@ const zpm = @import("./../zpm.zig"); // // -pub fn execute(self_name: []const u8, args: [][:0]u8) !void { +pub fn execute(self_name: []const u8, args: []const [:0]const u8) !void { _ = self_name; _ = args; diff --git a/src/main.zig b/src/main.zig index 6b743f4097aaa0a0f5044046268f71d218d52627..3de391d233d50944ca1da780ec8ac460689d40b2 100644 --- a/src/main.zig +++ b/src/main.zig @@ -14,12 +14,20 @@ pub const std_options: std.Options = .{ .log_level = std.log.Level.debug, }; -pub fn main() !void { +pub var io: std.Io = undefined; +pub var environ: *const std.process.Environ.Map = undefined; + +pub fn main(init: std.process.Init.Minimal) !void { const gpa = std.heap.c_allocator; + environ = &try init.environ.createMap(gpa); - const proc_args = try std.process.argsAlloc(gpa); + var threaded: std.Io.Threaded = .init(gpa, .{ .environ = init.environ }); + defer threaded.deinit(); + io = threaded.io(); + + const proc_args = try init.args.toSlice(gpa); const args = proc_args[1..]; - const self_path = try std.fs.selfExePathAlloc(gpa); + const self_path = try std.process.executablePathAlloc(io, gpa); if (args.len == 0) { std.debug.print("zigmod {s} {s} {s} {s}\n", .{ @@ -62,7 +70,7 @@ pub fn main() !void { for (args[1..]) |item| { try sub_cmd_args.append(item); } - const result = std.process.Child.run(.{ .allocator = gpa, .argv = sub_cmd_args.items }) catch |e| switch (e) { + const result = std.process.run(gpa, io, .{ .argv = sub_cmd_args.items }) catch |e| switch (e) { else => |ee| return ee, error.FileNotFound => { fail("unknown command \"{s}\" for \"zigmod\"", .{args[0]}); diff --git a/src/util/funcs.zig b/src/util/funcs.zig index 4bdae6c10af6d2ebb16ee6b4a3edfdc5ae34d87b..c3a48dc0ccd404ae396de14659497bc8eb3d969f 100644 --- a/src/util/funcs.zig +++ b/src/util/funcs.zig @@ -5,6 +5,8 @@ const extras = @import("extras"); const git = @import("git"); const ansi = @import("ansi"); const nfs = @import("nfs"); +const time = @import("time"); +const root = @import("root"); // // @@ -44,7 +46,7 @@ pub fn split(alloc: std.mem.Allocator, in: string, delim: u8) ![]string { return list.toOwnedSlice(); } -pub fn file_list(alloc: std.mem.Allocator, dpath: [:0]const u8) ![][:0]u8 { +pub fn file_list(alloc: std.mem.Allocator, dpath: [:0]const u8) ![]const [:0]const u8 { var dir = try nfs.cwd().openDir(dpath, .{}); defer dir.close(); var list = std.array_list.Managed([:0]u8).init(alloc); @@ -59,8 +61,9 @@ pub fn file_list(alloc: std.mem.Allocator, dpath: [:0]const u8) ![][:0]u8 { return list.toOwnedSlice(); } -pub fn run_cmd_raw(alloc: std.mem.Allocator, dir: ?string, args: []const string) !std.process.Child.RunResult { - return std.process.Child.run(.{ .allocator = alloc, .cwd = dir, .argv = args, .max_output_bytes = std.math.maxInt(usize) }) catch |e| switch (e) { +pub fn run_cmd_raw(alloc: std.mem.Allocator, dir: ?string, args: []const string) !std.process.RunResult { + const io = root.io; + return std.process.run(alloc, io, .{ .cwd = if (dir) |d| .{ .path = d } else .inherit, .argv = args }) catch |e| switch (e) { error.FileNotFound => { fail("\"{s}\" command not found", .{args[0]}); }, @@ -72,7 +75,7 @@ pub fn run_cmd(alloc: std.mem.Allocator, dir: ?string, args: []const string) !u3 const result = try run_cmd_raw(alloc, dir, args); alloc.free(result.stdout); alloc.free(result.stderr); - return result.term.Exited; + return result.term.exited; } pub fn list_remove(alloc: std.mem.Allocator, input: []string, search: string) ![]string { @@ -94,7 +97,7 @@ pub fn last(in: []string) ?string { const alphabet = "0123456789abcdefghijklmnopqrstuvwxyz"; pub fn random_string(comptime len: usize) [len]u8 { - const now: u64 = @intCast(std.time.nanoTimestamp()); + const now: u64 = @intCast(time.nanoTimestamp()); var rand = std.Random.DefaultPrng.init(now); var r = rand.random(); var buf: [len]u8 = undefined; diff --git a/zig.mod b/zig.mod index 371a608ca75692a6daa034939c822a2ddc126b33..18d742553906550f2dc749cdaab58019fa33e094 100644 --- a/zig.mod +++ b/zig.mod @@ -3,7 +3,7 @@ name: zigmod main: src/lib.zig license: MIT description: A package manager for the Zig programming language. -min_zig_version: 0.15.2 +min_zig_version: 0.16.0 min_zigmod_version: r96 dependencies: - src: git https://github.com/nektro/zig-yaml @@ -13,7 +13,7 @@ dependencies: name: known-folders main: known-folders.zig license: MIT - version: commit-83d39161eac2ed6f37ad3cb4d9dd518696ce90bb + version: commit-207c34a16e4365edc20d92c7892f962b3bed46e8 - src: git https://github.com/nektro/zig-licenses - src: git https://github.com/nektro/zig-detect-license - src: git https://github.com/nektro/zig-inquirer diff --git a/zigmod.lock b/zigmod.lock index ea0b4dc560ee266050fe77c96a37645be7fccd3d..a74f19bf768bd4ab06640c1cdb82e1117c8e0b90 100644 --- a/zigmod.lock +++ b/zigmod.lock @@ -1,23 +1,23 @@ 2 git https://github.com/marlersoft/zigwin32 commit-ec98bb4d9eea532320a8551720a9e3ec6de64994 -git https://github.com/nektro/arqv-ini commit-e229c738bbf5cf0d5464bf9178c17813069a7028 -git https://github.com/nektro/zig-ansi commit-d1c2ebf3f6c9b0d3aaa74a123d2f0a5657242431 -git https://github.com/nektro/zig-detect-license commit-e8ea5d969e1062d0be161f7a70e293b52aebc3f3 -git https://github.com/nektro/zig-extras commit-2cb1b3d619b10f4ad2c870f0359adb0c6129ca67 -git https://github.com/nektro/zig-git commit-8fdfc351842785192cad01aead798d85e25d1a48 -git https://github.com/nektro/zig-inquirer commit-3270255ea4c6d919853527e6a73baecfdee6867d -git https://github.com/nektro/zig-intrusive-parser commit-c21ce202c557a710fba6a2333f33bee7bbea114c -git https://github.com/nektro/zig-json commit-27d7354d9dc44982f1de40706721aee7d9c998a5 -git https://github.com/nektro/zig-leven commit-d97ef94cacf5c109b7f4b9e01a7e6645d8c8e09a -git https://github.com/nektro/zig-licenses commit-f0a95c802d6f955f131dae121550b2ec0acb97ff -git https://github.com/nektro/zig-licenses-text commit-88dc9ae4c338c652dc231ea477b8e0b56ac36743 -git https://github.com/nektro/zig-nfs commit-4c6b77b141abab5f6ac70ea712521f062b54df65 -git https://github.com/nektro/zig-nio commit-42f22d588059efa1e212f97402e94d81d675f28d -git https://github.com/nektro/zig-sys-darwin commit-3565d27455bd6c9f4650ea691cf4de47f9d229e7 -git https://github.com/nektro/zig-sys-linux commit-3f07f214aac54bcf8f84975a2312cd91ac67fa04 -git https://github.com/nektro/zig-time commit-c05c69b92a00b1afd07cb193f5069250e34ce488 -git https://github.com/nektro/zig-tracer commit-afa0f6df50960f3772b4e0b311ff86521da3e6d5 -git https://github.com/nektro/zig-yaml commit-fbf3642e7a9e354e2f48751b69ae1c41c0d7b062 +git https://github.com/nektro/arqv-ini commit-d2465c64833590a04bd9b7f50c87363fd03e65bf +git https://github.com/nektro/zig-ansi commit-bebb39ae30d9848a1c212cee582d0b1c102d8b87 +git https://github.com/nektro/zig-detect-license commit-6de79b4ff8f7462e26f224f4bed3c81710c8893b +git https://github.com/nektro/zig-extras commit-02301520811d7796de6e4f87961a44a6f458f702 +git https://github.com/nektro/zig-git commit-fec0b7e88951d866fc9196140748e95244232ea1 +git https://github.com/nektro/zig-inquirer commit-e745b018f87ddc4c8958370332e6cf61625403cc +git https://github.com/nektro/zig-intrusive-parser commit-cf841a5bb507b03e0e8ed1877bce8b9da4b97e3f +git https://github.com/nektro/zig-json commit-25dff500aea481527ea3aeaf9526e32b023326c1 +git https://github.com/nektro/zig-leven commit-014971d4b1e327a5c61322c3a6b9369fd1863864 +git https://github.com/nektro/zig-licenses commit-bc1cd51625c13d6c7df819fd0d85968e617f5c57 +git https://github.com/nektro/zig-licenses-text commit-a9d067c3c4d6c226a1de5531b66785bc15d869ee +git https://github.com/nektro/zig-nfs commit-0e6c256cd96af224511210d877acef60ac07484f +git https://github.com/nektro/zig-nio commit-6e45c4207fb2e1fc7fb2dbd3ecff28d2a3bfd92c +git https://github.com/nektro/zig-sys-darwin commit-b96e8bad94f53d5f426a32f237d9e8346f51b8f2 +git https://github.com/nektro/zig-sys-linux commit-065090fa8b3b1aaac21ff46756116713ff5a30dd +git https://github.com/nektro/zig-time commit-70ef29a006ceed7379df8801e3889da197de36ce +git https://github.com/nektro/zig-tracer commit-04c3ad0fbdfb57dea27da0c8cbb75e2539837c92 +git https://github.com/nektro/zig-yaml commit-dff9fd43ebf1046c70090bdccfeb2e4f1c0d584b git https://github.com/madler/zlib tag-v1.3.2 git https://github.com/yaml/libyaml tag-0.2.5 -git https://github.com/ziglibs/known-folders commit-83d39161eac2ed6f37ad3cb4d9dd518696ce90bb +git https://github.com/ziglibs/known-folders commit-207c34a16e4365edc20d92c7892f962b3bed46e8