authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-01 18:21:23 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-01 18:21:23 -07:00
log3082f4766486f3726c9431cc0b2f3d86456769bb
tree392173e24692fb0cb89e46a5ecb38cbfe27ee7d7
parentcb23793d9d99727a9f60d2a2b246c00487b016ca
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

update to zig 0.15.2


31 files changed, 252 insertions(+), 274 deletions(-)

.github/workflows/push.yml+1-1
......@@ -20,7 +20,7 @@ jobs:
2020 uses: mlugg/setup-zig@v2
2121 with:
2222 mirror: "http://mirrors.nektro.net/s3cgi"
23 version: "0.14.1"
23 version: "0.15.2"
2424
2525 - run: zig version
2626 - run: zig env
README.md+1-1
......@@ -22,7 +22,7 @@ A package manager for the Zig programming language.
2222
2323## Built With
2424
25- Zig `0.14.1`
25- Zig `0.15.2`
2626- See [`zig.mod`](./zig.mod) and [`zigmod.lock`](./zigmod.lock)
2727
2828### Build from Source
__snapshots__/explain.dot.txt+13-13
......@@ -4,6 +4,7 @@ digraph {
44 "root" -> "extras";
55 "root" -> "ansi";
66 "root" -> "nio";
7 "root" -> "nfs";
78 "zigmod" -> "yaml";
89 "zigmod" -> "ansi";
910 "zigmod" -> "known-folders";
......@@ -19,17 +20,7 @@ digraph {
1920 "zigmod" -> "nfs";
2021 "detect-license" -> "licenses-text";
2122 "detect-license" -> "leven";
22 "licenses-text" -> "json";
23 "json" -> "extras";
24 "json" -> "tracer";
25 "json" -> "intrusive-parser";
26 "json" -> "nio";
27 "tracer" -> "extras";
28 "tracer" -> "sys-linux";
29 "tracer" -> "nfs";
30 "tracer" -> "nio";
31 "tracer" -> "time";
32 "sys-linux" -> "c";
23 "detect-license" -> "nfs";
3324 "nfs" -> "sys-linux";
3425 "nfs" -> "nio";
3526 "nfs" -> "time";
......@@ -40,12 +31,21 @@ digraph {
4031 "time" -> "extras";
4132 "time" -> "sys-linux";
4233 "time" -> "sys-darwin";
43 "intrusive-parser" -> "extras";
44 "intrusive-parser" -> "nio";
4534 "inquirer" -> "ansi";
4635 "git" -> "time";
4736 "git" -> "extras";
4837 "git" -> "tracer";
4938 "git" -> "nfs";
5039 "git" -> "nio";
40 "tracer" -> "extras";
41 "tracer" -> "sys-linux";
42 "tracer" -> "nfs";
43 "tracer" -> "nio";
44 "tracer" -> "time";
45 "json" -> "extras";
46 "json" -> "tracer";
47 "json" -> "intrusive-parser";
48 "json" -> "nio";
49 "intrusive-parser" -> "extras";
50 "intrusive-parser" -> "nio";
5151}
__snapshots__/explain.mermaid.txt+13-13
......@@ -4,6 +4,7 @@ graph TD;
44 root-->extras;
55 root-->ansi;
66 root-->nio;
7 root-->nfs;
78 zigmod-->yaml;
89 zigmod-->ansi;
910 zigmod-->known-folders;
......@@ -19,17 +20,7 @@ graph TD;
1920 zigmod-->nfs;
2021 detect-license-->licenses-text;
2122 detect-license-->leven;
22 licenses-text-->json;
23 json-->extras;
24 json-->tracer;
25 json-->intrusive-parser;
26 json-->nio;
27 tracer-->extras;
28 tracer-->sys-linux;
29 tracer-->nfs;
30 tracer-->nio;
31 tracer-->time;
32 sys-linux-->c;
23 detect-license-->nfs;
3324 nfs-->sys-linux;
3425 nfs-->nio;
3526 nfs-->time;
......@@ -40,11 +31,20 @@ graph TD;
4031 time-->extras;
4132 time-->sys-linux;
4233 time-->sys-darwin;
43 intrusive-parser-->extras;
44 intrusive-parser-->nio;
4534 inquirer-->ansi;
4635 git-->time;
4736 git-->extras;
4837 git-->tracer;
4938 git-->nfs;
5039 git-->nio;
40 tracer-->extras;
41 tracer-->sys-linux;
42 tracer-->nfs;
43 tracer-->nio;
44 tracer-->time;
45 json-->extras;
46 json-->tracer;
47 json-->intrusive-parser;
48 json-->nio;
49 intrusive-parser-->extras;
50 intrusive-parser-->nio;
__snapshots__/explain.tree.txt+22-67
......@@ -7,110 +7,67 @@ root
77 licenses
88 detect-license
99 licenses-text
10 json
11 extras
12 tracer
13 extras
14 sys-linux
15 c
16 nfs
17 sys-linux
18 c
19 nio
20 sys-linux
21 c
22 extras
23 sys-darwin
24 time
25 extras
26 sys-linux
27 c
28 sys-darwin
29 sys-darwin
30 nio
31 sys-linux
32 c
33 extras
34 sys-darwin
35 time
36 extras
37 sys-linux
38 c
39 sys-darwin
40 intrusive-parser
41 extras
42 nio
43 sys-linux
44 c
45 extras
46 sys-darwin
47 nio
48 sys-linux
49 c
50 extras
51 sys-darwin
5210 leven
11 nfs
12 sys-linux
13 nio
14 sys-linux
15 extras
16 sys-darwin
17 time
18 extras
19 sys-linux
20 sys-darwin
21 sys-darwin
5322 inquirer
5423 ansi
5524 ini
5625 time
5726 extras
5827 sys-linux
59 c
6028 sys-darwin
6129 extras
6230 git
6331 time
6432 extras
6533 sys-linux
66 c
6734 sys-darwin
6835 extras
6936 tracer
7037 extras
7138 sys-linux
72 c
7339 nfs
7440 sys-linux
75 c
7641 nio
7742 sys-linux
78 c
7943 extras
8044 sys-darwin
8145 time
8246 extras
8347 sys-linux
84 c
8548 sys-darwin
8649 sys-darwin
8750 nio
8851 sys-linux
89 c
9052 extras
9153 sys-darwin
9254 time
9355 extras
9456 sys-linux
95 c
9657 sys-darwin
9758 nfs
9859 sys-linux
99 c
10060 nio
10161 sys-linux
102 c
10362 extras
10463 sys-darwin
10564 time
10665 extras
10766 sys-linux
108 c
10967 sys-darwin
11068 sys-darwin
11169 nio
11270 sys-linux
113 c
11471 extras
11572 sys-darwin
11673
......@@ -119,60 +76,48 @@ root
11976 tracer
12077 extras
12178 sys-linux
122 c
12379 nfs
12480 sys-linux
125 c
12681 nio
12782 sys-linux
128 c
12983 extras
13084 sys-darwin
13185 time
13286 extras
13387 sys-linux
134 c
13588 sys-darwin
13689 sys-darwin
13790 nio
13891 sys-linux
139 c
14092 extras
14193 sys-darwin
14294 time
14395 extras
14496 sys-linux
145 c
14697 sys-darwin
14798 intrusive-parser
14899 extras
149100 nio
150101 sys-linux
151 c
152102 extras
153103 sys-darwin
154104 nio
155105 sys-linux
156 c
157106 extras
158107 sys-darwin
159108 nio
160109 sys-linux
161 c
162110 extras
163111 sys-darwin
164112 nfs
165113 sys-linux
166 c
167114 nio
168115 sys-linux
169 c
170116 extras
171117 sys-darwin
172118 time
173119 extras
174120 sys-linux
175 c
176121 sys-darwin
177122 sys-darwin
178123 win32
......@@ -180,6 +125,16 @@ root
180125 ansi
181126 nio
182127 sys-linux
183 c
184128 extras
185129 sys-darwin
130 nfs
131 sys-linux
132 nio
133 sys-linux
134 extras
135 sys-darwin
136 time
137 extras
138 sys-linux
139 sys-darwin
140 sys-darwin
build.zig+7-4
......@@ -7,15 +7,17 @@ pub fn build(b: *std.Build) void {
77 b.reference_trace = 256;
88
99 const target = b.standardTargetOptions(.{});
10 const mode = b.option(std.builtin.Mode, "mode", "") orelse .Debug;
10 const mode = b.option(std.builtin.OptimizeMode, "mode", "") orelse .Debug;
1111 const use_full_name = b.option(bool, "use-full-name", "") orelse false;
1212 const with_arch_os = b.fmt("-{s}-{s}", .{ @tagName(target.result.cpu.arch), @tagName(target.result.os.tag) });
1313 const exe_name = b.fmt("{s}{s}", .{ "zigmod", if (use_full_name) with_arch_os else "" });
1414 const exe = b.addExecutable(.{
1515 .name = exe_name,
16 .root_source_file = b.path("src/main.zig"),
17 .target = target,
18 .optimize = mode,
16 .root_module = b.createModule(.{
17 .root_source_file = b.path("src/main.zig"),
18 .target = target,
19 .optimize = mode,
20 }),
1921 });
2022 const tag = b.option(string, "tag", "");
2123 const strip = b.option(bool, "strip", "Build without debug info.") orelse false;
......@@ -27,6 +29,7 @@ pub fn build(b: *std.Build) void {
2729 exe_options.addOption(string, "version", tag orelse std.mem.trimRight(u8, b.run(&.{ "git", "describe", "--tags" }), "\n"));
2830
2931 deps.addAllTo(exe);
32 exe.linkLibC();
3033 exe.root_module.strip = strip;
3134 // exe.use_llvm = !disable_llvm;
3235 // exe.use_lld = !disable_llvm;
deps.zig+76-73
......@@ -55,27 +55,27 @@ pub fn fetch(exe: *std.Build.Step.Compile) *std.Build.Step {
5555 if (path.* != null) path.* = b.fmt("{s}/zigmod/deps{s}", .{ root, path.*.? });
5656 }
5757 step.dependOn(&GitExactStep.create(b, "https://github.com/marlersoft/zigwin32", "ec98bb4d9eea532320a8551720a9e3ec6de64994").step);
58 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/arqv-ini", "ab427a4de4f875eaa39ee56a29114fc020431546").step);
59 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-ansi", "5f89211a749aef6bf518889c0467ceb24825c055").step);
60 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-detect-license", "a1a066da88dab50873a56f0349dc12dc76542077").step);
61 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-extras", "0cf756c80a4bc1b0459bc81bf8071891f12c3738").step);
62 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-git", "2b3f83cd341764f979969603e4f77e62f353b6a3").step);
63 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-inquirer", "4cddefa42744d61067567b0b36b5d2bb376e5ae3").step);
64 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-intrusive-parser", "a31b480914d15f3d13cdfb586aac950c73beebdd").step);
65 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-json", "fb918b08846233573467f5df41fcc3b733155663").step);
66 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-leven", "618eddde4ffbc6d34100e4bc6aa654d41161537a").step);
67 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses", "16cef5e32b3f8bbcf1064c599615290a720b6547").step);
68 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses-text", "ba0f00dfb23d28c301e4b54d0a278def2c38dc7b").step);
69 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-nfs", "6743e4e3b03cd3e8175a11f328e530edd054f2f1").step);
70 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-nio", "72fb20a7c5f6f466ced5c3bc731864ee69bc7682").step);
71 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-darwin", "c8ef1a85dfb5e1891454650f88d56bfaa0834304").step);
72 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-linux", "7c161d74c77ef9d482bb71273163fd454674240b").step);
73 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-time", "0f4db4c980146e4a3fc86a9a9070452a25ff9317").step);
74 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-tracer", "3a5fdea4ffd387a53ac2a42fb503557cdbe20696").step);
75 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-yaml", "c20de5ff5a7211007b57f8ae8914319debb473c4").step);
58 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/arqv-ini", "e229c738bbf5cf0d5464bf9178c17813069a7028").step);
59 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-ansi", "d1c2ebf3f6c9b0d3aaa74a123d2f0a5657242431").step);
60 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-detect-license", "e8ea5d969e1062d0be161f7a70e293b52aebc3f3").step);
61 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-extras", "2cb1b3d619b10f4ad2c870f0359adb0c6129ca67").step);
62 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-git", "8fdfc351842785192cad01aead798d85e25d1a48").step);
63 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-inquirer", "3270255ea4c6d919853527e6a73baecfdee6867d").step);
64 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-intrusive-parser", "c21ce202c557a710fba6a2333f33bee7bbea114c").step);
65 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-json", "27d7354d9dc44982f1de40706721aee7d9c998a5").step);
66 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-leven", "d97ef94cacf5c109b7f4b9e01a7e6645d8c8e09a").step);
67 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses", "f0a95c802d6f955f131dae121550b2ec0acb97ff").step);
68 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses-text", "88dc9ae4c338c652dc231ea477b8e0b56ac36743").step);
69 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-nfs", "4c6b77b141abab5f6ac70ea712521f062b54df65").step);
70 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-nio", "42f22d588059efa1e212f97402e94d81d675f28d").step);
71 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-darwin", "3565d27455bd6c9f4650ea691cf4de47f9d229e7").step);
72 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-linux", "3f07f214aac54bcf8f84975a2312cd91ac67fa04").step);
73 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-time", "c05c69b92a00b1afd07cb193f5069250e34ce488").step);
74 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-tracer", "afa0f6df50960f3772b4e0b311ff86521da3e6d5").step);
75 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-yaml", "fbf3642e7a9e354e2f48751b69ae1c41c0d7b062").step);
7676 step.dependOn(&GitExactStep.create(b, "https://github.com/madler/zlib", "da607da739fa6047df13e66a2af6b8bec7c2a498").step);
7777 step.dependOn(&GitExactStep.create(b, "https://github.com/yaml/libyaml", "2c891fc7a770e8ba2fec34fc6b545c672beb37e6").step);
78 step.dependOn(&GitExactStep.create(b, "https://github.com/ziglibs/known-folders", "aa24df42183ad415d10bc0a33e6238c437fc0f59").step);
78 step.dependOn(&GitExactStep.create(b, "https://github.com/ziglibs/known-folders", "83d39161eac2ed6f37ad3cb4d9dd518696ce90bb").step);
7979 return step;
8080}
8181
......@@ -126,10 +126,13 @@ pub const Package = struct {
126126 .target = exe.root_module.resolved_target,
127127 });
128128 const target = result.resolved_target.?.result;
129 const dummy_library = b.addStaticLibrary(.{
129 const dummy_library = b.addLibrary(.{
130 .linkage = .static,
130131 .name = b.fmt("dummy-{s}", .{self.name}),
131 .target = exe.root_module.resolved_target orelse b.graph.host,
132 .optimize = exe.root_module.optimize.?,
132 .root_module = b.createModule(.{
133 .target = exe.root_module.resolved_target orelse b.graph.host,
134 .optimize = exe.root_module.optimize.?,
135 }),
133136 });
134137 dummy_library.step.dependOn(fetch_step);
135138 var links: u32 = 0;
......@@ -145,6 +148,7 @@ pub const Package = struct {
145148 switch (jtem) {
146149 .path => result.addIncludePath(jtem.path),
147150 .path_system, .path_after, .framework_path, .framework_path_system, .other_step, .config_header_step => {},
151 .embed_path => {},
148152 }
149153 }
150154 }
......@@ -159,7 +163,7 @@ pub const Package = struct {
159163 links += 1;
160164 }
161165 for (self.system_libs) |item| {
162 if (std.zig.target.isLibCLibName(target, item)) continue;
166 if (std.zig.target.isLibCLibName(&target, item)) continue;
163167 dummy_library.linkSystemLibrary(item);
164168 links += 1;
165169 }
......@@ -181,8 +185,8 @@ pub const Package = struct {
181185};
182186
183187fn checkMinZig(current: std.SemanticVersion, exe: *std.Build.Step.Compile) void {
184 const min = std.SemanticVersion.parse("0.14.1") catch return;
185 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}));
188 const min = std.SemanticVersion.parse("0.15.2") catch return;
189 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}));
186190}
187191
188192pub const package_data = struct {
......@@ -192,106 +196,103 @@ pub const package_data = struct {
192196 .entry = "/git/github.com/marlersoft/zigwin32/ec98bb4d9eea532320a8551720a9e3ec6de64994/win32.zig",
193197 };
194198 pub var _u7sysdckdymi = Package{
195 .store = "/git/github.com/nektro/arqv-ini/ab427a4de4f875eaa39ee56a29114fc020431546",
199 .store = "/git/github.com/nektro/arqv-ini/e229c738bbf5cf0d5464bf9178c17813069a7028",
196200 .name = "ini",
197 .entry = "/git/github.com/nektro/arqv-ini/ab427a4de4f875eaa39ee56a29114fc020431546/src/ini.zig",
201 .entry = "/git/github.com/nektro/arqv-ini/e229c738bbf5cf0d5464bf9178c17813069a7028/src/ini.zig",
198202 };
199203 pub var _s84v9o48ucb0 = Package{
200 .store = "/git/github.com/nektro/zig-ansi/5f89211a749aef6bf518889c0467ceb24825c055",
204 .store = "/git/github.com/nektro/zig-ansi/d1c2ebf3f6c9b0d3aaa74a123d2f0a5657242431",
201205 .name = "ansi",
202 .entry = "/git/github.com/nektro/zig-ansi/5f89211a749aef6bf518889c0467ceb24825c055/src/lib.zig",
206 .entry = "/git/github.com/nektro/zig-ansi/d1c2ebf3f6c9b0d3aaa74a123d2f0a5657242431/src/lib.zig",
203207 };
204208 pub var _f7dubzb7cyqe = Package{
205 .store = "/git/github.com/nektro/zig-extras/0cf756c80a4bc1b0459bc81bf8071891f12c3738",
209 .store = "/git/github.com/nektro/zig-extras/2cb1b3d619b10f4ad2c870f0359adb0c6129ca67",
206210 .name = "extras",
207 .entry = "/git/github.com/nektro/zig-extras/0cf756c80a4bc1b0459bc81bf8071891f12c3738/src/lib.zig",
211 .entry = "/git/github.com/nektro/zig-extras/2cb1b3d619b10f4ad2c870f0359adb0c6129ca67/src/lib.zig",
208212 };
209213 pub var _c1xirp1ota5p = Package{
210 .store = "/git/github.com/nektro/zig-inquirer/4cddefa42744d61067567b0b36b5d2bb376e5ae3",
214 .store = "/git/github.com/nektro/zig-inquirer/3270255ea4c6d919853527e6a73baecfdee6867d",
211215 .name = "inquirer",
212 .entry = "/git/github.com/nektro/zig-inquirer/4cddefa42744d61067567b0b36b5d2bb376e5ae3/src/lib.zig",
216 .entry = "/git/github.com/nektro/zig-inquirer/3270255ea4c6d919853527e6a73baecfdee6867d/src/lib.zig",
213217 .deps = &[_]*Package{ &_s84v9o48ucb0 },
214218 };
215219 pub var _96h80ezrvj7i = Package{
216 .store = "/git/github.com/nektro/zig-leven/618eddde4ffbc6d34100e4bc6aa654d41161537a",
220 .store = "/git/github.com/nektro/zig-leven/d97ef94cacf5c109b7f4b9e01a7e6645d8c8e09a",
217221 .name = "leven",
218 .entry = "/git/github.com/nektro/zig-leven/618eddde4ffbc6d34100e4bc6aa654d41161537a/src/lib.zig",
222 .entry = "/git/github.com/nektro/zig-leven/d97ef94cacf5c109b7f4b9e01a7e6645d8c8e09a/src/lib.zig",
219223 };
220224 pub var _0npcrzfdlrvk = Package{
221 .store = "/git/github.com/nektro/zig-licenses/16cef5e32b3f8bbcf1064c599615290a720b6547",
225 .store = "/git/github.com/nektro/zig-licenses/f0a95c802d6f955f131dae121550b2ec0acb97ff",
222226 .name = "licenses",
223 .entry = "/git/github.com/nektro/zig-licenses/16cef5e32b3f8bbcf1064c599615290a720b6547/src/lib.zig",
227 .entry = "/git/github.com/nektro/zig-licenses/f0a95c802d6f955f131dae121550b2ec0acb97ff/src/lib.zig",
228 };
229 pub var _pt88y5d80m25 = Package{
230 .store = "/git/github.com/nektro/zig-licenses-text/88dc9ae4c338c652dc231ea477b8e0b56ac36743",
231 .name = "licenses-text",
232 .entry = "/git/github.com/nektro/zig-licenses-text/88dc9ae4c338c652dc231ea477b8e0b56ac36743/src/lib.zig",
224233 };
225234 pub var _73bukkeci2u6 = Package{
226 .store = "/git/github.com/nektro/zig-sys-darwin/c8ef1a85dfb5e1891454650f88d56bfaa0834304",
235 .store = "/git/github.com/nektro/zig-sys-darwin/3565d27455bd6c9f4650ea691cf4de47f9d229e7",
227236 .name = "sys-darwin",
228 .entry = "/git/github.com/nektro/zig-sys-darwin/c8ef1a85dfb5e1891454650f88d56bfaa0834304/sys_darwin.zig",
237 .entry = "/git/github.com/nektro/zig-sys-darwin/3565d27455bd6c9f4650ea691cf4de47f9d229e7/sys_darwin.zig",
229238 };
230239 pub var _h7tv7ayhffak = Package{
231 .store = "/git/github.com/nektro/zig-sys-linux/7c161d74c77ef9d482bb71273163fd454674240b",
240 .store = "/git/github.com/nektro/zig-sys-linux/3f07f214aac54bcf8f84975a2312cd91ac67fa04",
232241 .name = "sys-linux",
233 .entry = "/git/github.com/nektro/zig-sys-linux/7c161d74c77ef9d482bb71273163fd454674240b/mod.zig",
234 .deps = &[_]*Package{ },
235 .system_libs = &.{ "c" },
242 .entry = "/git/github.com/nektro/zig-sys-linux/3f07f214aac54bcf8f84975a2312cd91ac67fa04/mod.zig",
236243 };
237244 pub var _kscsl0145t7x = Package{
238 .store = "/git/github.com/nektro/zig-nio/72fb20a7c5f6f466ced5c3bc731864ee69bc7682",
245 .store = "/git/github.com/nektro/zig-nio/42f22d588059efa1e212f97402e94d81d675f28d",
239246 .name = "nio",
240 .entry = "/git/github.com/nektro/zig-nio/72fb20a7c5f6f466ced5c3bc731864ee69bc7682/nio.zig",
247 .entry = "/git/github.com/nektro/zig-nio/42f22d588059efa1e212f97402e94d81d675f28d/nio.zig",
241248 .deps = &[_]*Package{ &_h7tv7ayhffak, &_f7dubzb7cyqe, &_73bukkeci2u6 },
242249 };
243250 pub var _7l3oxw6nqqws = Package{
244 .store = "/git/github.com/nektro/zig-intrusive-parser/a31b480914d15f3d13cdfb586aac950c73beebdd",
251 .store = "/git/github.com/nektro/zig-intrusive-parser/c21ce202c557a710fba6a2333f33bee7bbea114c",
245252 .name = "intrusive-parser",
246 .entry = "/git/github.com/nektro/zig-intrusive-parser/a31b480914d15f3d13cdfb586aac950c73beebdd/intrusive_parser.zig",
253 .entry = "/git/github.com/nektro/zig-intrusive-parser/c21ce202c557a710fba6a2333f33bee7bbea114c/intrusive_parser.zig",
247254 .deps = &[_]*Package{ &_f7dubzb7cyqe, &_kscsl0145t7x },
248255 };
249256 pub var _iecwp4b3bsfm = Package{
250 .store = "/git/github.com/nektro/zig-time/0f4db4c980146e4a3fc86a9a9070452a25ff9317",
257 .store = "/git/github.com/nektro/zig-time/c05c69b92a00b1afd07cb193f5069250e34ce488",
251258 .name = "time",
252 .entry = "/git/github.com/nektro/zig-time/0f4db4c980146e4a3fc86a9a9070452a25ff9317/time.zig",
259 .entry = "/git/github.com/nektro/zig-time/c05c69b92a00b1afd07cb193f5069250e34ce488/time.zig",
253260 .deps = &[_]*Package{ &_f7dubzb7cyqe, &_h7tv7ayhffak, &_73bukkeci2u6 },
254261 };
255262 pub var _vph9l0hxpeze = Package{
256 .store = "/git/github.com/nektro/zig-nfs/6743e4e3b03cd3e8175a11f328e530edd054f2f1",
263 .store = "/git/github.com/nektro/zig-nfs/4c6b77b141abab5f6ac70ea712521f062b54df65",
257264 .name = "nfs",
258 .entry = "/git/github.com/nektro/zig-nfs/6743e4e3b03cd3e8175a11f328e530edd054f2f1/nfs.zig",
265 .entry = "/git/github.com/nektro/zig-nfs/4c6b77b141abab5f6ac70ea712521f062b54df65/nfs.zig",
259266 .deps = &[_]*Package{ &_h7tv7ayhffak, &_kscsl0145t7x, &_iecwp4b3bsfm, &_73bukkeci2u6 },
260267 };
268 pub var _2ovav391ivak = Package{
269 .store = "/git/github.com/nektro/zig-detect-license/e8ea5d969e1062d0be161f7a70e293b52aebc3f3",
270 .name = "detect-license",
271 .entry = "/git/github.com/nektro/zig-detect-license/e8ea5d969e1062d0be161f7a70e293b52aebc3f3/src/lib.zig",
272 .deps = &[_]*Package{ &_pt88y5d80m25, &_96h80ezrvj7i, &_vph9l0hxpeze },
273 };
261274 pub var _ede2wygpe1iy = Package{
262 .store = "/git/github.com/nektro/zig-tracer/3a5fdea4ffd387a53ac2a42fb503557cdbe20696",
275 .store = "/git/github.com/nektro/zig-tracer/afa0f6df50960f3772b4e0b311ff86521da3e6d5",
263276 .name = "tracer",
264 .entry = "/git/github.com/nektro/zig-tracer/3a5fdea4ffd387a53ac2a42fb503557cdbe20696/src/mod.zig",
277 .entry = "/git/github.com/nektro/zig-tracer/afa0f6df50960f3772b4e0b311ff86521da3e6d5/src/mod.zig",
265278 .deps = &[_]*Package{ &_f7dubzb7cyqe, &_h7tv7ayhffak, &_vph9l0hxpeze, &_kscsl0145t7x, &_iecwp4b3bsfm },
266279 };
267280 pub var _0k64oe2nuzvj = Package{
268 .store = "/git/github.com/nektro/zig-git/2b3f83cd341764f979969603e4f77e62f353b6a3",
281 .store = "/git/github.com/nektro/zig-git/8fdfc351842785192cad01aead798d85e25d1a48",
269282 .name = "git",
270 .entry = "/git/github.com/nektro/zig-git/2b3f83cd341764f979969603e4f77e62f353b6a3/git.zig",
283 .entry = "/git/github.com/nektro/zig-git/8fdfc351842785192cad01aead798d85e25d1a48/git.zig",
271284 .deps = &[_]*Package{ &_iecwp4b3bsfm, &_f7dubzb7cyqe, &_ede2wygpe1iy, &_vph9l0hxpeze, &_kscsl0145t7x, &_0e2d06bb494b },
272285 };
273286 pub var _ocmr9rtohgcc = Package{
274 .store = "/git/github.com/nektro/zig-json/fb918b08846233573467f5df41fcc3b733155663",
287 .store = "/git/github.com/nektro/zig-json/27d7354d9dc44982f1de40706721aee7d9c998a5",
275288 .name = "json",
276 .entry = "/git/github.com/nektro/zig-json/fb918b08846233573467f5df41fcc3b733155663/json.zig",
289 .entry = "/git/github.com/nektro/zig-json/27d7354d9dc44982f1de40706721aee7d9c998a5/json.zig",
277290 .deps = &[_]*Package{ &_f7dubzb7cyqe, &_ede2wygpe1iy, &_7l3oxw6nqqws, &_kscsl0145t7x },
278291 };
279 pub var _pt88y5d80m25 = Package{
280 .store = "/git/github.com/nektro/zig-licenses-text/ba0f00dfb23d28c301e4b54d0a278def2c38dc7b",
281 .name = "licenses-text",
282 .entry = "/git/github.com/nektro/zig-licenses-text/ba0f00dfb23d28c301e4b54d0a278def2c38dc7b/src/lib.zig",
283 .deps = &[_]*Package{ &_ocmr9rtohgcc },
284 };
285 pub var _2ovav391ivak = Package{
286 .store = "/git/github.com/nektro/zig-detect-license/a1a066da88dab50873a56f0349dc12dc76542077",
287 .name = "detect-license",
288 .entry = "/git/github.com/nektro/zig-detect-license/a1a066da88dab50873a56f0349dc12dc76542077/src/lib.zig",
289 .deps = &[_]*Package{ &_pt88y5d80m25, &_96h80ezrvj7i },
290 };
291292 pub var _g982zq6e8wsv = Package{
292 .store = "/git/github.com/nektro/zig-yaml/c20de5ff5a7211007b57f8ae8914319debb473c4",
293 .store = "/git/github.com/nektro/zig-yaml/fbf3642e7a9e354e2f48751b69ae1c41c0d7b062",
293294 .name = "yaml",
294 .entry = "/git/github.com/nektro/zig-yaml/c20de5ff5a7211007b57f8ae8914319debb473c4/yaml.zig",
295 .entry = "/git/github.com/nektro/zig-yaml/fbf3642e7a9e354e2f48751b69ae1c41c0d7b062/yaml.zig",
295296 .deps = &[_]*Package{ &_8mdbh0zuneb0 },
296297 };
297298 pub var _0e2d06bb494b = Package{
......@@ -307,9 +308,9 @@ pub const package_data = struct {
307308 .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" },
308309 };
309310 pub var _2ta738wrqbaq = Package{
310 .store = "/git/github.com/ziglibs/known-folders/aa24df42183ad415d10bc0a33e6238c437fc0f59",
311 .store = "/git/github.com/ziglibs/known-folders/83d39161eac2ed6f37ad3cb4d9dd518696ce90bb",
311312 .name = "known-folders",
312 .entry = "/git/github.com/ziglibs/known-folders/aa24df42183ad415d10bc0a33e6238c437fc0f59/known-folders.zig",
313 .entry = "/git/github.com/ziglibs/known-folders/83d39161eac2ed6f37ad3cb4d9dd518696ce90bb/known-folders.zig",
313314 };
314315 pub var _89ujp8gq842x = Package{
315316 .name = "zigmod",
......@@ -326,6 +327,7 @@ pub const packages = [_]*Package{
326327 &package_data._f7dubzb7cyqe,
327328 &package_data._s84v9o48ucb0,
328329 &package_data._kscsl0145t7x,
330 &package_data._vph9l0hxpeze,
329331};
330332
331333pub const pkgs = struct {
......@@ -334,6 +336,7 @@ pub const pkgs = struct {
334336 pub const extras = &package_data._f7dubzb7cyqe;
335337 pub const ansi = &package_data._s84v9o48ucb0;
336338 pub const nio = &package_data._kscsl0145t7x;
339 pub const nfs = &package_data._vph9l0hxpeze;
337340};
338341
339342pub const imports = struct {
docs/README.md+1-1
......@@ -10,7 +10,7 @@ The rest of this documentation will assume you already have Zig installed.
1010
1111As 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.
1212
13The earliest Zig release this Zigmod was verified to work with is `0.14.1`.
13The earliest Zig release this Zigmod was verified to work with is `0.15.2`.
1414
1515## Download
1616You may download a precompiled binary from https://github.com/nektro/zigmod/releases or build the project from source.
docs/commands/install.md+1-1
......@@ -22,6 +22,6 @@ zigmod install [git|hg|http] [url]
2222```
2323$ zigmod install git https://github.com/nektro/zigmod
2424debug: modpath: /home/me/.cache/zigmod/deps/git/github.com/nektro/zigmod
25debug: argv: { /home/me/.local/share/zig/0.14.1/zig, build, --prefix, /home/me/.zigmod }
25debug: argv: { /home/me/.local/share/zig/0.15.2/zig, build, --prefix, /home/me/.zigmod }
2626info: success!
2727```
licenses.txt-3
......@@ -29,6 +29,3 @@ MPL-2.0:
2929Zlib:
3030= https://spdx.org/licenses/Zlib
3131- git https://github.com/madler/zlib
32
33Unspecified:
34- system_lib c
src/cmd/ci.zig+1-1
......@@ -28,7 +28,7 @@ pub fn do(alloc: std.mem.Allocator, cachepath: [:0]const u8, dir: nfs.Dir) !void
2828 };
2929 const top_module = try common.collect_deps_deep(cachepath, dir, &options);
3030
31 var list = std.ArrayList(zigmod.Module).init(alloc);
31 var list = std.array_list.Managed(zigmod.Module).init(alloc);
3232 try common.collect_pkgs(top_module, &list);
3333
3434 const fetch = @import("./fetch.zig");
src/cmd/explain.zig+5-6
......@@ -34,11 +34,10 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
3434 };
3535 const top_module = try common.collect_deps_deep(cachepath, dir, &options);
3636
37 var seencache = std.ArrayList([48]u8).init(gpa);
37 var seencache = std.array_list.Managed([48]u8).init(gpa);
3838 defer seencache.deinit();
3939
40 const stdout = std.io.getStdOut();
41 const w = stdout.writer();
40 const w = nfs.stdout();
4241
4342 switch (format) {
4443 .tree => {
......@@ -59,14 +58,14 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
5958fn printTree(writer: anytype, module: zigmod.Module, depth: u16) !void {
6059 try writer.writeByteNTimes('\t', depth);
6160 try writer.writeAll(module.name);
62 try writer.writeByte('\n');
61 try writer.writeAll("\n");
6362
6463 for (module.deps) |dep| {
6564 try printTree(writer, dep, depth + 1);
6665 }
6766}
6867
69fn printMermaid(writer: anytype, module: zigmod.Module, seencache: *std.ArrayList([48]u8)) !void {
68fn printMermaid(writer: anytype, module: zigmod.Module, seencache: *std.array_list.Managed([48]u8)) !void {
7069 for (seencache.items) |item| {
7170 if (std.mem.eql(u8, &module.id, &item)) {
7271 return;
......@@ -83,7 +82,7 @@ fn printMermaid(writer: anytype, module: zigmod.Module, seencache: *std.ArrayLis
8382 }
8483}
8584
86fn printDot(writer: anytype, module: zigmod.Module, seencache: *std.ArrayList([48]u8)) !void {
85fn printDot(writer: anytype, module: zigmod.Module, seencache: *std.array_list.Managed([48]u8)) !void {
8786 for (seencache.items) |item| {
8887 if (std.mem.eql(u8, &module.id, &item)) {
8988 return;
src/cmd/fetch.zig+11-10
......@@ -27,7 +27,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
2727 };
2828 const top_module = try common.collect_deps_deep(cachepath, dir, &options);
2929
30 var list = std.ArrayList(zigmod.Module).init(gpa);
30 var list = std.array_list.Managed(zigmod.Module).init(gpa);
3131 try common.collect_pkgs(top_module, &list);
3232
3333 try create_depszig(gpa, cachepath, dir, top_module, &list);
......@@ -44,7 +44,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
4444 try license.do(cachepath, dir, &options, outfile);
4545}
4646
47pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: nfs.Dir, top_module: zigmod.Module, list: *std.ArrayList(zigmod.Module)) !void {
47pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: nfs.Dir, top_module: zigmod.Module, list: *std.array_list.Managed(zigmod.Module)) !void {
4848 const f = try dir.createFile("deps.zig", .{});
4949 defer f.close();
5050
......@@ -107,6 +107,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: nfs.Dir,
107107 \\ switch (jtem) {
108108 \\ .path => result.addIncludePath(jtem.path),
109109 \\ .path_system, .path_after, .framework_path, .framework_path_system, .other_step, .config_header_step => {},
110 \\ .embed_path => {},
110111 \\ }
111112 \\ }
112113 \\ }
......@@ -120,7 +121,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: nfs.Dir,
120121 \\ link_lib_c = true;
121122 \\ }
122123 \\ for (self.system_libs) |item| {
123 \\ if (skip_libc and std.zig.target.isLibCLibName(target, item)) continue;
124 \\ if (skip_libc and std.zig.target.isLibCLibName(&target, item)) continue;
124125 \\ result.linkSystemLibrary(item, .{});
125126 \\ exe.linkSystemLibrary(item);
126127 \\ link_lib_c = true;
......@@ -145,7 +146,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: nfs.Dir,
145146 try w.print(
146147 \\fn checkMinZig(current: std.SemanticVersion, exe: *std.Build.Step.Compile) void {{
147148 \\ const min = std.SemanticVersion.parse("{?}") catch return;
148 \\ 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}}));
149 \\ 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}}));
149150 \\}}
150151 \\
151152 \\
......@@ -156,8 +157,8 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: nfs.Dir,
156157 try w.writeAll("};\n\n");
157158
158159 try w.writeAll("pub const package_data = struct {\n");
159 var duped = std.ArrayList(zigmod.Module).init(alloc);
160 var done = std.ArrayList(zigmod.Module).init(alloc);
160 var duped = std.array_list.Managed(zigmod.Module).init(alloc);
161 var done = std.array_list.Managed(zigmod.Module).init(alloc);
161162 for (list.items) |mod| {
162163 if (mod.type == .system_lib or mod.type == .framework) {
163164 continue;
......@@ -180,7 +181,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: nfs.Dir,
180181 try w.writeAll("};\n");
181182}
182183
183fn create_lockfile(alloc: std.mem.Allocator, list: *std.ArrayList(zigmod.Module), path: string, dir: nfs.Dir) !void {
184fn create_lockfile(alloc: std.mem.Allocator, list: *std.array_list.Managed(zigmod.Module), path: string, dir: nfs.Dir) !void {
184185 const fl = try dir.createFile("zigmod.lock", .{});
185186 defer fl.close();
186187
......@@ -214,8 +215,8 @@ fn diff_lockfile(alloc: std.mem.Allocator) !void {
214215 if (std.mem.startsWith(u8, line, "@@")) break;
215216 }
216217
217 var rems = std.ArrayList(string).init(alloc);
218 var adds = std.ArrayList(string).init(alloc);
218 var rems = std.array_list.Managed(string).init(alloc);
219 var adds = std.array_list.Managed(string).init(alloc);
219220 while (try r.readUntilDelimiterOrEofAlloc(alloc, '\n', max)) |line_full| {
220221 const line = line_full[0 .. line_full.len - 1];
221222 if (line[0] == ' ') continue;
......@@ -322,7 +323,7 @@ fn print_deps(w: nfs.File, m: zigmod.Module) !void {
322323 try w.writeAll("}");
323324}
324325
325fn print_pkg_data_to(w: nfs.File, notdone: *std.ArrayList(zigmod.Module), done: *std.ArrayList(zigmod.Module)) !void {
326fn print_pkg_data_to(w: nfs.File, notdone: *std.array_list.Managed(zigmod.Module), done: *std.array_list.Managed(zigmod.Module)) !void {
326327 var len: usize = notdone.items.len;
327328 while (notdone.items.len > 0) {
328329 for (notdone.items, 0..) |mod, i| {
src/cmd/generate.zig+13-9
......@@ -27,7 +27,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
2727 };
2828 const top_module = try common.collect_deps_deep(cachepath, dir, &options);
2929
30 var list = std.ArrayList(zigmod.Module).init(gpa);
30 var list = std.array_list.Managed(zigmod.Module).init(gpa);
3131 try common.collect_pkgs(top_module, &list);
3232
3333 std.mem.sort(zigmod.Module, list.items, {}, zigmod.Module.lessThan);
......@@ -162,10 +162,13 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: [:0]const u8, dir: nf
162162 \\ .target = exe.root_module.resolved_target,
163163 \\ });
164164 \\ const target = result.resolved_target.?.result;
165 \\ const dummy_library = b.addStaticLibrary(.{
165 \\ const dummy_library = b.addLibrary(.{
166 \\ .linkage = .static,
166167 \\ .name = b.fmt("dummy-{s}", .{self.name}),
167 \\ .target = exe.root_module.resolved_target orelse b.graph.host,
168 \\ .optimize = exe.root_module.optimize.?,
168 \\ .root_module = b.createModule(.{
169 \\ .target = exe.root_module.resolved_target orelse b.graph.host,
170 \\ .optimize = exe.root_module.optimize.?,
171 \\ }),
169172 \\ });
170173 \\ dummy_library.step.dependOn(fetch_step);
171174 \\ var links: u32 = 0;
......@@ -181,6 +184,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: [:0]const u8, dir: nf
181184 \\ switch (jtem) {
182185 \\ .path => result.addIncludePath(jtem.path),
183186 \\ .path_system, .path_after, .framework_path, .framework_path_system, .other_step, .config_header_step => {},
187 \\ .embed_path => {},
184188 \\ }
185189 \\ }
186190 \\ }
......@@ -195,7 +199,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: [:0]const u8, dir: nf
195199 \\ links += 1;
196200 \\ }
197201 \\ for (self.system_libs) |item| {
198 \\ if (std.zig.target.isLibCLibName(target, item)) continue;
202 \\ if (std.zig.target.isLibCLibName(&target, item)) continue;
199203 \\ dummy_library.linkSystemLibrary(item);
200204 \\ links += 1;
201205 \\ }
......@@ -222,15 +226,15 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: [:0]const u8, dir: nf
222226 try w.print(
223227 \\fn checkMinZig(current: std.SemanticVersion, exe: *std.Build.Step.Compile) void {{
224228 \\ const min = std.SemanticVersion.parse("{?}") catch return;
225 \\ 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}}));
229 \\ 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}}));
226230 \\}}
227231 \\
228232 \\
229233 , .{if (top_module.minZigVersion()) |sv| u.altSemanticVersion(sv) else null});
230234
231235 try w.writeAll("pub const package_data = struct {\n");
232 var duped = std.ArrayList(zigmod.Module).init(alloc);
233 var done = std.ArrayList(zigmod.Module).init(alloc);
236 var duped = std.array_list.Managed(zigmod.Module).init(alloc);
237 var done = std.array_list.Managed(zigmod.Module).init(alloc);
234238 for (list) |mod| {
235239 if (mod.type == .system_lib or mod.type == .framework) {
236240 continue;
......@@ -278,7 +282,7 @@ fn print_deps(w: nfs.File, m: zigmod.Module) !void {
278282 try w.writeAll("}");
279283}
280284
281fn print_pkg_data_to(w: nfs.File, alloc: std.mem.Allocator, cachepath: [:0]const u8, notdone: *std.ArrayList(zigmod.Module), done: *std.ArrayList(zigmod.Module), options: *common.CollectOptions) !void {
285fn print_pkg_data_to(w: nfs.File, alloc: std.mem.Allocator, cachepath: [:0]const u8, notdone: *std.array_list.Managed(zigmod.Module), done: *std.array_list.Managed(zigmod.Module), options: *common.CollectOptions) !void {
282286 var len: usize = notdone.items.len;
283287 while (notdone.items.len > 0) {
284288 for (notdone.items, 0..) |mod, i| {
src/cmd/init.zig+2-2
......@@ -45,7 +45,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
4545 }) else null;
4646 const entry = if (entry_bare) |ent| try gpa.dupeZ(u8, ent) else null;
4747
48 const maybe_license_text = try detectlicense.detectInDir(gpa, cwd.to_std());
48 const maybe_license_text = try detectlicense.detectInDir(gpa, cwd);
4949 const license = try inquirer.forString(stdout, stdin, "license:", gpa, maybe_license_text);
5050
5151 const description = try inquirer.forString(stdout, stdin, "description:", gpa, null);
......@@ -312,7 +312,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
312312 };
313313 const top_module = try common.collect_deps_deep(cachepath, dir, &options);
314314
315 var list = std.ArrayList(zigmod.Module).init(alloc);
315 var list = std.array_list.Managed(zigmod.Module).init(alloc);
316316 try common.collect_pkgs(top_module, &list);
317317
318318 const fetch = @import("./fetch.zig");
src/cmd/install.zig+16-1
......@@ -73,7 +73,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
7373 zigpath, "build",
7474 "--prefix", try std.fs.path.join(gpa, &.{ homepath, ".zigmod" }),
7575 };
76 std.log.debug("argv: {s}", .{argv});
76 logargv(argv) catch return;
7777 var proc = std.process.Child.init(argv, gpa);
7878 proc.cwd = modpath;
7979 const term = try proc.spawnAndWait();
......@@ -85,3 +85,18 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
8585 }
8686 std.log.info("success!", .{});
8787}
88
89// needed this after moving to zig 0.15
90// /zig/0.15.2/lib/std/Io/Writer.zig:1122:51: error: expected type '[]const u8', found '[]const []const u8'
91fn logargv(argv: []const []const u8) !void {
92 var buffer: [64]u8 = undefined;
93 const stderr = std.debug.lockStderrWriter(&buffer);
94 defer std.debug.unlockStderrWriter();
95 try stderr.writeAll("debug: argv: {");
96 for (argv, 0..) |v, i| {
97 if (i > 0) try stderr.writeAll(",");
98 try stderr.writeAll(" ");
99 try stderr.writeAll(v);
100 }
101 try stderr.writeAll(" }\n");
102}
src/cmd/license.zig+1-1
......@@ -10,7 +10,7 @@ const zigmod = @import("../lib.zig");
1010const u = @import("./../util/funcs.zig");
1111const common = @import("./../common.zig");
1212
13const List = std.ArrayList(zigmod.Module);
13const List = std.array_list.Managed(zigmod.Module);
1414const Map = std.StringArrayHashMap(*List);
1515
1616// Inspired by:
src/cmd/sum.zig+1-1
......@@ -29,7 +29,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
2929 const w = f;
3030
3131 //
32 var module_list = std.ArrayList(zigmod.Module).init(gpa);
32 var module_list = std.array_list.Managed(zigmod.Module).init(gpa);
3333 try common.collect_pkgs(top_module, &module_list);
3434
3535 for (module_list.items) |m| {
src/cmd/version.zig+2-2
......@@ -18,8 +18,8 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
1818 var gitversion = u.git_rev_HEAD(gpa, nfs.cwd()) catch "";
1919 gitversion = if (gitversion.len > 0) gitversion[0..9] else gitversion;
2020
21 const stdout = std.io.getStdOut();
22 const w = stdout.writer();
21 const stdout = nfs.stdout();
22 const w = stdout;
2323
2424 try w.writeAll("zigmod");
2525
src/cmd/zpm.zig+9-10
......@@ -61,22 +61,21 @@ pub fn server_fetch(url: string) !json.Document {
6161 var client: std.http.Client = .{ .allocator = gpa };
6262 defer client.deinit();
6363
64 var req = try client.open(.GET, try std.Uri.parse(url), .{
65 .server_header_buffer = &buf,
64 var req = try client.request(.GET, try std.Uri.parse(url), .{
65 .headers = .{ .accept_encoding = .{ .override = "identity" } },
6666 });
6767 defer req.deinit();
68 try req.send();
69 try req.finish();
70 try req.wait();
71 if (req.response.status != .ok) u.fail("expected: 200 from '{s}' got: {s}", .{ url, @tagName(req.response.status) });
72 return json.parse(gpa, "", nio.AnyReadable.fromStd(&req.reader()), .{ .support_trailing_commas = true, .maximum_depth = 100 });
68 try req.sendBodiless();
69 var resp = try req.receiveHead(&.{});
70 if (resp.head.status != .ok) u.fail("expected: 200 from '{s}' got: {s}", .{ url, @tagName(resp.head.status) });
71 return json.parse(gpa, "", nio.AnyReadable.fromStd(resp.reader(&buf)), .{ .support_trailing_commas = true, .maximum_depth = 100 });
7372}
7473
7574pub fn server_fetchArray(url: string) ![]const Package {
7675 const doc = try server_fetch(url);
7776 doc.acquire();
7877 defer doc.release();
79 var list = std.ArrayList(Package).init(gpa);
78 var list = std.array_list.Managed(Package).init(gpa);
8079 errdefer list.deinit();
8180
8281 for (doc.root.array()) |item| {
......@@ -97,7 +96,7 @@ pub fn server_fetchArray(url: string) ![]const Package {
9796}
9897
9998fn valueStrArray(vals: json.Array) ![]string {
100 var list = std.ArrayList(string).init(gpa);
99 var list = std.array_list.Managed(string).init(gpa);
101100 errdefer list.deinit();
102101
103102 for (vals) |item| {
......@@ -108,7 +107,7 @@ fn valueStrArray(vals: json.Array) ![]string {
108107}
109108
110109fn valueLinks(vals: json.ObjectIndex) ![]string {
111 var list = std.ArrayList(string).init(gpa);
110 var list = std.array_list.Managed(string).init(gpa);
112111 errdefer list.deinit();
113112
114113 if (vals.getS("github")) |x| try list.append(x);
src/cmd/zpm/add.zig+11-13
......@@ -42,31 +42,29 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
4242 }
4343 }
4444
45 var buf: [4096]u8 = @splat(0);
45 // var buf: [4096]u8 = @splat(0);
4646 var client: std.http.Client = .{ .allocator = gpa };
4747 defer client.deinit();
4848
4949 const has_zigdotmod = blk: {
5050 const _url = try std.mem.join(gpa, "/", &.{ found.git, "blob", "HEAD", "zig.mod" });
51 var _req = try client.open(.GET, try std.Uri.parse(_url), .{
52 .server_header_buffer = &buf,
51 var _req = try client.request(.GET, try std.Uri.parse(_url), .{
52 .headers = .{ .accept_encoding = .{ .override = "identity" } },
5353 });
5454 defer _req.deinit();
55 try _req.send();
56 try _req.finish();
57 try _req.wait();
58 break :blk _req.response.status == .ok;
55 try _req.sendBodiless();
56 const resp = try _req.receiveHead(&.{});
57 break :blk resp.head.status == .ok;
5958 };
6059 const has_zigmodyml = blk: {
6160 const _url = try std.mem.join(gpa, "/", &.{ found.git, "blob", "HEAD", "zigmod.yml" });
62 var _req = try client.open(.GET, try std.Uri.parse(_url), .{
63 .server_header_buffer = &buf,
61 var _req = try client.request(.GET, try std.Uri.parse(_url), .{
62 .headers = .{ .accept_encoding = .{ .override = "identity" } },
6463 });
6564 defer _req.deinit();
66 try _req.send();
67 try _req.finish();
68 try _req.wait();
69 break :blk _req.response.status == .ok;
65 try _req.sendBodiless();
66 const resp = try _req.receiveHead(&.{});
67 break :blk resp.head.status == .ok;
7068 };
7169
7270 _, const file = try zigmod.ModFile.openFile(nfs.cwd(), .{ .mode = .read_write });
src/cmd/zpm/search.zig+2-1
......@@ -1,6 +1,7 @@
11const std = @import("std");
22const gpa = std.heap.c_allocator;
33const extras = @import("extras");
4const nfs = @import("nfs");
45
56const zpm = @import("./../zpm.zig");
67
......@@ -11,7 +12,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
1112 _ = self_name;
1213 _ = args;
1314
14 const out = std.io.getStdOut().writer();
15 const out = nfs.stdout();
1516
1617 const url = try std.mem.join(gpa, "/", &.{ zpm.server_root, "packages" });
1718 const list = try zpm.server_fetchArray(url);
src/cmd/zpm/showjson.zig+2-1
......@@ -1,5 +1,6 @@
11const std = @import("std");
22const gpa = std.heap.c_allocator;
3const nfs = @import("nfs");
34
45const zpm = @import("./../zpm.zig");
56
......@@ -9,7 +10,7 @@ const zpm = @import("./../zpm.zig");
910pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
1011 _ = self_name;
1112
12 const out = std.io.getStdOut().writer();
13 const out = nfs.stdout();
1314
1415 const url = try std.mem.join(gpa, "/", &.{ zpm.server_root, args[0] });
1516 const doc = try zpm.server_fetch(url);
src/cmd/zpm/tags.zig+2-1
......@@ -1,6 +1,7 @@
11const std = @import("std");
22const gpa = std.heap.c_allocator;
33const extras = @import("extras");
4const nfs = @import("nfs");
45
56const zpm = @import("./../zpm.zig");
67
......@@ -11,7 +12,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void {
1112 _ = self_name;
1213 _ = args;
1314
14 const out = std.io.getStdOut().writer();
15 const out = nfs.stdout();
1516
1617 const url = try std.mem.join(gpa, "/", &.{ zpm.server_root, "tags" });
1718 const doc = try zpm.server_fetch(url);
src/common.zig+7-7
......@@ -19,11 +19,11 @@ pub const CollectOptions = struct {
1919 update: bool,
2020 lock: ?[]const [4]string = null,
2121 alloc: std.mem.Allocator,
22 already_fetched: *std.ArrayList(string) = undefined,
22 already_fetched: *std.array_list.Managed(string) = undefined,
2323
2424 pub fn init(self: *CollectOptions) !void {
25 self.already_fetched = try self.alloc.create(std.ArrayList(string));
26 self.already_fetched.* = std.ArrayList(string).init(self.alloc);
25 self.already_fetched = try self.alloc.create(std.array_list.Managed(string));
26 self.already_fetched.* = std.array_list.Managed(string).init(self.alloc);
2727 }
2828};
2929
......@@ -32,7 +32,7 @@ pub fn collect_deps_deep(cachepath: [:0]const u8, mdir: nfs.Dir, options: *Colle
3232
3333 const m = try zigmod.ModFile.from_dir(options.alloc, mdir, ".");
3434 try options.init();
35 var moduledeps = std.ArrayList(zigmod.Module).init(options.alloc);
35 var moduledeps = std.array_list.Managed(zigmod.Module).init(options.alloc);
3636 errdefer moduledeps.deinit();
3737 if (m.root_files.len > 0) {
3838 try gen_files_package(options.alloc, cachepath, mdir, m.root_files);
......@@ -65,7 +65,7 @@ pub fn collect_deps(cachepath: [:0]const u8, mdir: nfs.Dir, mdir_path: string, d
6565 try nfs.cwd().makePath(cachepath);
6666
6767 const m = try zigmod.ModFile.from_dir(options.alloc, mdir, mdir_path);
68 var moduledeps = std.ArrayList(zigmod.Module).init(options.alloc);
68 var moduledeps = std.array_list.Managed(zigmod.Module).init(options.alloc);
6969 errdefer moduledeps.deinit();
7070 if (m.files.len > 0) {
7171 try gen_files_package(options.alloc, cachepath, mdir, m.files);
......@@ -91,7 +91,7 @@ pub fn collect_deps(cachepath: [:0]const u8, mdir: nfs.Dir, mdir_path: string, d
9191 };
9292}
9393
94pub fn collect_pkgs(mod: zigmod.Module, list: *std.ArrayList(zigmod.Module)) anyerror!void {
94pub fn collect_pkgs(mod: zigmod.Module, list: *std.array_list.Managed(zigmod.Module)) anyerror!void {
9595 if (extras.containsAggregate(zigmod.Module, list.items, mod)) {
9696 return;
9797 }
......@@ -336,7 +336,7 @@ pub fn gen_files_package(alloc: std.mem.Allocator, cachepath: string, mdir: nfs.
336336}
337337
338338pub fn parse_lockfile(alloc: std.mem.Allocator, dir: nfs.Dir) ![]const [4]string {
339 var list = std.ArrayList([4]string).init(alloc);
339 var list = std.array_list.Managed([4]string).init(alloc);
340340 const max = std.math.maxInt(usize);
341341 if (!try dir.exists("zigmod.lock")) return &[_][4]string{};
342342 var f = try dir.openFile("zigmod.lock", .{});
src/main.zig+4-3
......@@ -5,6 +5,7 @@ pub const build_options = @import("build_options");
55const zigmod = @import("zigmod");
66const win32 = @import("win32");
77const nio = @import("nio");
8const nfs = @import("nfs");
89
910//
1011//
......@@ -56,7 +57,7 @@ pub fn main() !void {
5657 }
5758 }
5859
59 var sub_cmd_args = std.ArrayList(string).init(gpa);
60 var sub_cmd_args = std.array_list.Managed(string).init(gpa);
6061 try sub_cmd_args.append(try nio.fmt.allocPrint(gpa, "zigmod-{s}", .{args[0]}));
6162 for (args[1..]) |item| {
6263 try sub_cmd_args.append(item);
......@@ -67,8 +68,8 @@ pub fn main() !void {
6768 fail("unknown command \"{s}\" for \"zigmod\"", .{args[0]});
6869 },
6970 };
70 try std.io.getStdOut().writeAll(result.stdout);
71 try std.io.getStdErr().writeAll(result.stderr);
71 try nfs.stdout().writeAll(result.stdout);
72 try nfs.stderr().writeAll(result.stderr);
7273}
7374
7475//
src/util/funcs.zig+3-4
......@@ -34,7 +34,7 @@ pub fn try_index(comptime T: type, array: []const T, n: usize, def: T) T {
3434}
3535
3636pub fn split(alloc: std.mem.Allocator, in: string, delim: u8) ![]string {
37 var list = std.ArrayList(string).init(alloc);
37 var list = std.array_list.Managed(string).init(alloc);
3838 errdefer list.deinit();
3939
4040 var iter = std.mem.splitScalar(u8, in, delim);
......@@ -47,7 +47,7 @@ pub fn split(alloc: std.mem.Allocator, in: string, delim: u8) ![]string {
4747pub fn file_list(alloc: std.mem.Allocator, dpath: [:0]const u8) ![][:0]u8 {
4848 var dir = try nfs.cwd().openDir(dpath, .{});
4949 defer dir.close();
50 var list = std.ArrayList([:0]u8).init(alloc);
50 var list = std.array_list.Managed([:0]u8).init(alloc);
5151 errdefer list.deinit();
5252 errdefer for (list.items) |x| alloc.free(x);
5353 var walker = try dir.walk(alloc);
......@@ -76,7 +76,7 @@ pub fn run_cmd(alloc: std.mem.Allocator, dir: ?string, args: []const string) !u3
7676}
7777
7878pub fn list_remove(alloc: std.mem.Allocator, input: []string, search: string) ![]string {
79 var list = std.ArrayList(string).init(alloc);
79 var list = std.array_list.Managed(string).init(alloc);
8080 errdefer list.deinit();
8181 for (input) |item| {
8282 if (!std.mem.eql(u8, item, search)) {
......@@ -249,7 +249,6 @@ const StringEscape = struct {
249249 ' ', '!', '#'...'&', '('...'[', ']'...'~' => try writer.writeAll(&.{c}),
250250 else => {
251251 try writer.print("\\x{x:0>2}", .{c});
252 // try writer.printInt(c, 16, .lower, .{ .width = 2, .fill = '0' });
253252 },
254253 };
255254 }
src/util/modfile.zig+1-1
......@@ -95,7 +95,7 @@ pub const ModFile = struct {
9595 }
9696
9797 fn dep_list_by_name(alloc: std.mem.Allocator, mapping: yaml.Mapping, props: []const string, for_build: bool) std.mem.Allocator.Error![]zigmod.Dep {
98 var dep_list = std.ArrayList(zigmod.Dep).init(alloc);
98 var dep_list = std.array_list.Managed(zigmod.Dep).init(alloc);
9999 errdefer dep_list.deinit();
100100
101101 for (props) |prop| {
src/util/module.zig+2-2
......@@ -33,7 +33,7 @@ pub const Module = struct {
3333 pub const ROOT: [48]u8 = ("root" ++ (" " ** 44)).*;
3434
3535 pub fn from(alloc: std.mem.Allocator, dep: zigmod.Dep, cachepath: [:0]const u8, options: *common.CollectOptions) !Module {
36 var moddeps = std.ArrayList(Module).init(alloc);
36 var moddeps = std.array_list.Managed(Module).init(alloc);
3737 errdefer moddeps.deinit();
3838
3939 for (dep.deps) |*d| {
......@@ -71,7 +71,7 @@ pub const Module = struct {
7171 pub fn get_hash(self: Module, alloc: std.mem.Allocator, cdpath: string) !string {
7272 const file_list_1 = try u.file_list(alloc, try std.mem.concatWithSentinel(alloc, u8, &.{ cdpath, "/", self.clean_path }, 0));
7373
74 var file_list_2 = std.ArrayList(string).init(alloc);
74 var file_list_2 = std.array_list.Managed(string).init(alloc);
7575 errdefer file_list_2.deinit();
7676 for (file_list_1) |item| {
7777 const _a = extras.trimPrefix(item, cdpath);
zig.mod+3-2
......@@ -3,7 +3,7 @@ name: zigmod
33main: src/lib.zig
44license: MIT
55description: A package manager for the Zig programming language.
6min_zig_version: 0.14.1
6min_zig_version: 0.15.2
77min_zigmod_version: r96
88dependencies:
99 - src: git https://github.com/nektro/zig-yaml
......@@ -13,7 +13,7 @@ dependencies:
1313 name: known-folders
1414 main: known-folders.zig
1515 license: MIT
16 version: commit-aa24df42183ad415d10bc0a33e6238c437fc0f59
16 version: commit-83d39161eac2ed6f37ad3cb4d9dd518696ce90bb
1717 - src: git https://github.com/nektro/zig-licenses
1818 - src: git https://github.com/nektro/zig-detect-license
1919 - src: git https://github.com/nektro/zig-inquirer
......@@ -35,3 +35,4 @@ root_dependencies:
3535 - src: git https://github.com/nektro/zig-extras
3636 - src: git https://github.com/nektro/zig-ansi
3737 - src: git https://github.com/nektro/zig-nio
38 - src: git https://github.com/nektro/zig-nfs
zigmod.lock+19-19
......@@ -1,23 +1,23 @@
112
22git https://github.com/marlersoft/zigwin32 commit-ec98bb4d9eea532320a8551720a9e3ec6de64994
3git https://github.com/nektro/arqv-ini commit-ab427a4de4f875eaa39ee56a29114fc020431546
4git https://github.com/nektro/zig-ansi commit-5f89211a749aef6bf518889c0467ceb24825c055
5git https://github.com/nektro/zig-detect-license commit-a1a066da88dab50873a56f0349dc12dc76542077
6git https://github.com/nektro/zig-extras commit-0cf756c80a4bc1b0459bc81bf8071891f12c3738
7git https://github.com/nektro/zig-git commit-2b3f83cd341764f979969603e4f77e62f353b6a3
8git https://github.com/nektro/zig-inquirer commit-4cddefa42744d61067567b0b36b5d2bb376e5ae3
9git https://github.com/nektro/zig-intrusive-parser commit-a31b480914d15f3d13cdfb586aac950c73beebdd
10git https://github.com/nektro/zig-json commit-fb918b08846233573467f5df41fcc3b733155663
11git https://github.com/nektro/zig-leven commit-618eddde4ffbc6d34100e4bc6aa654d41161537a
12git https://github.com/nektro/zig-licenses commit-16cef5e32b3f8bbcf1064c599615290a720b6547
13git https://github.com/nektro/zig-licenses-text commit-ba0f00dfb23d28c301e4b54d0a278def2c38dc7b
14git https://github.com/nektro/zig-nfs commit-6743e4e3b03cd3e8175a11f328e530edd054f2f1
15git https://github.com/nektro/zig-nio commit-72fb20a7c5f6f466ced5c3bc731864ee69bc7682
16git https://github.com/nektro/zig-sys-darwin commit-c8ef1a85dfb5e1891454650f88d56bfaa0834304
17git https://github.com/nektro/zig-sys-linux commit-7c161d74c77ef9d482bb71273163fd454674240b
18git https://github.com/nektro/zig-time commit-0f4db4c980146e4a3fc86a9a9070452a25ff9317
19git https://github.com/nektro/zig-tracer commit-3a5fdea4ffd387a53ac2a42fb503557cdbe20696
20git https://github.com/nektro/zig-yaml commit-c20de5ff5a7211007b57f8ae8914319debb473c4
3git https://github.com/nektro/arqv-ini commit-e229c738bbf5cf0d5464bf9178c17813069a7028
4git https://github.com/nektro/zig-ansi commit-d1c2ebf3f6c9b0d3aaa74a123d2f0a5657242431
5git https://github.com/nektro/zig-detect-license commit-e8ea5d969e1062d0be161f7a70e293b52aebc3f3
6git https://github.com/nektro/zig-extras commit-2cb1b3d619b10f4ad2c870f0359adb0c6129ca67
7git https://github.com/nektro/zig-git commit-8fdfc351842785192cad01aead798d85e25d1a48
8git https://github.com/nektro/zig-inquirer commit-3270255ea4c6d919853527e6a73baecfdee6867d
9git https://github.com/nektro/zig-intrusive-parser commit-c21ce202c557a710fba6a2333f33bee7bbea114c
10git https://github.com/nektro/zig-json commit-27d7354d9dc44982f1de40706721aee7d9c998a5
11git https://github.com/nektro/zig-leven commit-d97ef94cacf5c109b7f4b9e01a7e6645d8c8e09a
12git https://github.com/nektro/zig-licenses commit-f0a95c802d6f955f131dae121550b2ec0acb97ff
13git https://github.com/nektro/zig-licenses-text commit-88dc9ae4c338c652dc231ea477b8e0b56ac36743
14git https://github.com/nektro/zig-nfs commit-4c6b77b141abab5f6ac70ea712521f062b54df65
15git https://github.com/nektro/zig-nio commit-42f22d588059efa1e212f97402e94d81d675f28d
16git https://github.com/nektro/zig-sys-darwin commit-3565d27455bd6c9f4650ea691cf4de47f9d229e7
17git https://github.com/nektro/zig-sys-linux commit-3f07f214aac54bcf8f84975a2312cd91ac67fa04
18git https://github.com/nektro/zig-time commit-c05c69b92a00b1afd07cb193f5069250e34ce488
19git https://github.com/nektro/zig-tracer commit-afa0f6df50960f3772b4e0b311ff86521da3e6d5
20git https://github.com/nektro/zig-yaml commit-fbf3642e7a9e354e2f48751b69ae1c41c0d7b062
2121git https://github.com/madler/zlib tag-v1.3.2
2222git https://github.com/yaml/libyaml tag-0.2.5
23git https://github.com/ziglibs/known-folders commit-aa24df42183ad415d10bc0a33e6238c437fc0f59
23git https://github.com/ziglibs/known-folders commit-83d39161eac2ed6f37ad3cb4d9dd518696ce90bb