| author | |
| committer | |
| log | 3082f4766486f3726c9431cc0b2f3d86456769bb |
| tree | 392173e24692fb0cb89e46a5ecb38cbfe27ee7d7 |
| parent | cb23793d9d99727a9f60d2a2b246c00487b016ca |
| signature |
31 files changed, 252 insertions(+), 274 deletions(-)
.github/workflows/push.yml+1-1| ... | ... | @@ -20,7 +20,7 @@ jobs: |
| 20 | 20 | uses: mlugg/setup-zig@v2 |
| 21 | 21 | with: |
| 22 | 22 | mirror: "http://mirrors.nektro.net/s3cgi" |
| 23 | version: "0.14.1" | |
| 23 | version: "0.15.2" | |
| 24 | 24 | |
| 25 | 25 | - run: zig version |
| 26 | 26 | - run: zig env |
README.md+1-1| ... | ... | @@ -22,7 +22,7 @@ A package manager for the Zig programming language. |
| 22 | 22 | |
| 23 | 23 | ## Built With |
| 24 | 24 | |
| 25 | - Zig `0.14.1` | |
| 25 | - Zig `0.15.2` | |
| 26 | 26 | - See [`zig.mod`](./zig.mod) and [`zigmod.lock`](./zigmod.lock) |
| 27 | 27 | |
| 28 | 28 | ### Build from Source |
__snapshots__/explain.dot.txt+13-13| ... | ... | @@ -4,6 +4,7 @@ digraph { |
| 4 | 4 | "root" -> "extras"; |
| 5 | 5 | "root" -> "ansi"; |
| 6 | 6 | "root" -> "nio"; |
| 7 | "root" -> "nfs"; | |
| 7 | 8 | "zigmod" -> "yaml"; |
| 8 | 9 | "zigmod" -> "ansi"; |
| 9 | 10 | "zigmod" -> "known-folders"; |
| ... | ... | @@ -19,17 +20,7 @@ digraph { |
| 19 | 20 | "zigmod" -> "nfs"; |
| 20 | 21 | "detect-license" -> "licenses-text"; |
| 21 | 22 | "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"; | |
| 33 | 24 | "nfs" -> "sys-linux"; |
| 34 | 25 | "nfs" -> "nio"; |
| 35 | 26 | "nfs" -> "time"; |
| ... | ... | @@ -40,12 +31,21 @@ digraph { |
| 40 | 31 | "time" -> "extras"; |
| 41 | 32 | "time" -> "sys-linux"; |
| 42 | 33 | "time" -> "sys-darwin"; |
| 43 | "intrusive-parser" -> "extras"; | |
| 44 | "intrusive-parser" -> "nio"; | |
| 45 | 34 | "inquirer" -> "ansi"; |
| 46 | 35 | "git" -> "time"; |
| 47 | 36 | "git" -> "extras"; |
| 48 | 37 | "git" -> "tracer"; |
| 49 | 38 | "git" -> "nfs"; |
| 50 | 39 | "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"; | |
| 51 | 51 | } |
__snapshots__/explain.mermaid.txt+13-13| ... | ... | @@ -4,6 +4,7 @@ graph TD; |
| 4 | 4 | root-->extras; |
| 5 | 5 | root-->ansi; |
| 6 | 6 | root-->nio; |
| 7 | root-->nfs; | |
| 7 | 8 | zigmod-->yaml; |
| 8 | 9 | zigmod-->ansi; |
| 9 | 10 | zigmod-->known-folders; |
| ... | ... | @@ -19,17 +20,7 @@ graph TD; |
| 19 | 20 | zigmod-->nfs; |
| 20 | 21 | detect-license-->licenses-text; |
| 21 | 22 | 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; | |
| 33 | 24 | nfs-->sys-linux; |
| 34 | 25 | nfs-->nio; |
| 35 | 26 | nfs-->time; |
| ... | ... | @@ -40,11 +31,20 @@ graph TD; |
| 40 | 31 | time-->extras; |
| 41 | 32 | time-->sys-linux; |
| 42 | 33 | time-->sys-darwin; |
| 43 | intrusive-parser-->extras; | |
| 44 | intrusive-parser-->nio; | |
| 45 | 34 | inquirer-->ansi; |
| 46 | 35 | git-->time; |
| 47 | 36 | git-->extras; |
| 48 | 37 | git-->tracer; |
| 49 | 38 | git-->nfs; |
| 50 | 39 | 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 |
| 7 | 7 | 		licenses |
| 8 | 8 | 		detect-license |
| 9 | 9 | 			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 | |
| 52 | 10 | 			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 | |
| 53 | 22 | 		inquirer |
| 54 | 23 | 			ansi |
| 55 | 24 | 		ini |
| 56 | 25 | 		time |
| 57 | 26 | 			extras |
| 58 | 27 | 			sys-linux |
| 59 | 				c | |
| 60 | 28 | 			sys-darwin |
| 61 | 29 | 		extras |
| 62 | 30 | 		git |
| 63 | 31 | 			time |
| 64 | 32 | 				extras |
| 65 | 33 | 				sys-linux |
| 66 | 					c | |
| 67 | 34 | 				sys-darwin |
| 68 | 35 | 			extras |
| 69 | 36 | 			tracer |
| 70 | 37 | 				extras |
| 71 | 38 | 				sys-linux |
| 72 | 					c | |
| 73 | 39 | 				nfs |
| 74 | 40 | 					sys-linux |
| 75 | 						c | |
| 76 | 41 | 					nio |
| 77 | 42 | 						sys-linux |
| 78 | 							c | |
| 79 | 43 | 						extras |
| 80 | 44 | 						sys-darwin |
| 81 | 45 | 					time |
| 82 | 46 | 						extras |
| 83 | 47 | 						sys-linux |
| 84 | 							c | |
| 85 | 48 | 						sys-darwin |
| 86 | 49 | 					sys-darwin |
| 87 | 50 | 				nio |
| 88 | 51 | 					sys-linux |
| 89 | 						c | |
| 90 | 52 | 					extras |
| 91 | 53 | 					sys-darwin |
| 92 | 54 | 				time |
| 93 | 55 | 					extras |
| 94 | 56 | 					sys-linux |
| 95 | 						c | |
| 96 | 57 | 					sys-darwin |
| 97 | 58 | 			nfs |
| 98 | 59 | 				sys-linux |
| 99 | 					c | |
| 100 | 60 | 				nio |
| 101 | 61 | 					sys-linux |
| 102 | 						c | |
| 103 | 62 | 					extras |
| 104 | 63 | 					sys-darwin |
| 105 | 64 | 				time |
| 106 | 65 | 					extras |
| 107 | 66 | 					sys-linux |
| 108 | 						c | |
| 109 | 67 | 					sys-darwin |
| 110 | 68 | 				sys-darwin |
| 111 | 69 | 			nio |
| 112 | 70 | 				sys-linux |
| 113 | 					c | |
| 114 | 71 | 				extras |
| 115 | 72 | 				sys-darwin |
| 116 | 73 | 			 |
| ... | ... | @@ -119,60 +76,48 @@ root |
| 119 | 76 | 			tracer |
| 120 | 77 | 				extras |
| 121 | 78 | 				sys-linux |
| 122 | 					c | |
| 123 | 79 | 				nfs |
| 124 | 80 | 					sys-linux |
| 125 | 						c | |
| 126 | 81 | 					nio |
| 127 | 82 | 						sys-linux |
| 128 | 							c | |
| 129 | 83 | 						extras |
| 130 | 84 | 						sys-darwin |
| 131 | 85 | 					time |
| 132 | 86 | 						extras |
| 133 | 87 | 						sys-linux |
| 134 | 							c | |
| 135 | 88 | 						sys-darwin |
| 136 | 89 | 					sys-darwin |
| 137 | 90 | 				nio |
| 138 | 91 | 					sys-linux |
| 139 | 						c | |
| 140 | 92 | 					extras |
| 141 | 93 | 					sys-darwin |
| 142 | 94 | 				time |
| 143 | 95 | 					extras |
| 144 | 96 | 					sys-linux |
| 145 | 						c | |
| 146 | 97 | 					sys-darwin |
| 147 | 98 | 			intrusive-parser |
| 148 | 99 | 				extras |
| 149 | 100 | 				nio |
| 150 | 101 | 					sys-linux |
| 151 | 						c | |
| 152 | 102 | 					extras |
| 153 | 103 | 					sys-darwin |
| 154 | 104 | 			nio |
| 155 | 105 | 				sys-linux |
| 156 | 					c | |
| 157 | 106 | 				extras |
| 158 | 107 | 				sys-darwin |
| 159 | 108 | 		nio |
| 160 | 109 | 			sys-linux |
| 161 | 				c | |
| 162 | 110 | 			extras |
| 163 | 111 | 			sys-darwin |
| 164 | 112 | 		nfs |
| 165 | 113 | 			sys-linux |
| 166 | 				c | |
| 167 | 114 | 			nio |
| 168 | 115 | 				sys-linux |
| 169 | 					c | |
| 170 | 116 | 				extras |
| 171 | 117 | 				sys-darwin |
| 172 | 118 | 			time |
| 173 | 119 | 				extras |
| 174 | 120 | 				sys-linux |
| 175 | 					c | |
| 176 | 121 | 				sys-darwin |
| 177 | 122 | 			sys-darwin |
| 178 | 123 | 	win32 |
| ... | ... | @@ -180,6 +125,16 @@ root |
| 180 | 125 | 	ansi |
| 181 | 126 | 	nio |
| 182 | 127 | 		sys-linux |
| 183 | 			c | |
| 184 | 128 | 		extras |
| 185 | 129 | 		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 { |
| 7 | 7 | b.reference_trace = 256; |
| 8 | 8 | |
| 9 | 9 | 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; | |
| 11 | 11 | const use_full_name = b.option(bool, "use-full-name", "") orelse false; |
| 12 | 12 | const with_arch_os = b.fmt("-{s}-{s}", .{ @tagName(target.result.cpu.arch), @tagName(target.result.os.tag) }); |
| 13 | 13 | const exe_name = b.fmt("{s}{s}", .{ "zigmod", if (use_full_name) with_arch_os else "" }); |
| 14 | 14 | const exe = b.addExecutable(.{ |
| 15 | 15 | .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 | }), | |
| 19 | 21 | }); |
| 20 | 22 | const tag = b.option(string, "tag", ""); |
| 21 | 23 | const strip = b.option(bool, "strip", "Build without debug info.") orelse false; |
| ... | ... | @@ -27,6 +29,7 @@ pub fn build(b: *std.Build) void { |
| 27 | 29 | exe_options.addOption(string, "version", tag orelse std.mem.trimRight(u8, b.run(&.{ "git", "describe", "--tags" }), "\n")); |
| 28 | 30 | |
| 29 | 31 | deps.addAllTo(exe); |
| 32 | exe.linkLibC(); | |
| 30 | 33 | exe.root_module.strip = strip; |
| 31 | 34 | // exe.use_llvm = !disable_llvm; |
| 32 | 35 | // exe.use_lld = !disable_llvm; |
deps.zig+76-73| ... | ... | @@ -55,27 +55,27 @@ pub fn fetch(exe: *std.Build.Step.Compile) *std.Build.Step { |
| 55 | 55 | if (path.* != null) path.* = b.fmt("{s}/zigmod/deps{s}", .{ root, path.*.? }); |
| 56 | 56 | } |
| 57 | 57 | 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); | |
| 76 | 76 | step.dependOn(&GitExactStep.create(b, "https://github.com/madler/zlib", "da607da739fa6047df13e66a2af6b8bec7c2a498").step); |
| 77 | 77 | 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); | |
| 79 | 79 | return step; |
| 80 | 80 | } |
| 81 | 81 | |
| ... | ... | @@ -126,10 +126,13 @@ pub const Package = struct { |
| 126 | 126 | .target = exe.root_module.resolved_target, |
| 127 | 127 | }); |
| 128 | 128 | const target = result.resolved_target.?.result; |
| 129 | const dummy_library = b.addStaticLibrary(.{ | |
| 129 | const dummy_library = b.addLibrary(.{ | |
| 130 | .linkage = .static, | |
| 130 | 131 | .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 | }), | |
| 133 | 136 | }); |
| 134 | 137 | dummy_library.step.dependOn(fetch_step); |
| 135 | 138 | var links: u32 = 0; |
| ... | ... | @@ -145,6 +148,7 @@ pub const Package = struct { |
| 145 | 148 | switch (jtem) { |
| 146 | 149 | .path => result.addIncludePath(jtem.path), |
| 147 | 150 | .path_system, .path_after, .framework_path, .framework_path_system, .other_step, .config_header_step => {}, |
| 151 | .embed_path => {}, | |
| 148 | 152 | } |
| 149 | 153 | } |
| 150 | 154 | } |
| ... | ... | @@ -159,7 +163,7 @@ pub const Package = struct { |
| 159 | 163 | links += 1; |
| 160 | 164 | } |
| 161 | 165 | for (self.system_libs) |item| { |
| 162 | if (std.zig.target.isLibCLibName(target, item)) continue; | |
| 166 | if (std.zig.target.isLibCLibName(&target, item)) continue; | |
| 163 | 167 | dummy_library.linkSystemLibrary(item); |
| 164 | 168 | links += 1; |
| 165 | 169 | } |
| ... | ... | @@ -181,8 +185,8 @@ pub const Package = struct { |
| 181 | 185 | }; |
| 182 | 186 | |
| 183 | 187 | fn 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})); | |
| 186 | 190 | } |
| 187 | 191 | |
| 188 | 192 | pub const package_data = struct { |
| ... | ... | @@ -192,106 +196,103 @@ pub const package_data = struct { |
| 192 | 196 | .entry = "/git/github.com/marlersoft/zigwin32/ec98bb4d9eea532320a8551720a9e3ec6de64994/win32.zig", |
| 193 | 197 | }; |
| 194 | 198 | pub var _u7sysdckdymi = Package{ |
| 195 | .store = "/git/github.com/nektro/arqv-ini/ab427a4de4f875eaa39ee56a29114fc020431546", | |
| 199 | .store = "/git/github.com/nektro/arqv-ini/e229c738bbf5cf0d5464bf9178c17813069a7028", | |
| 196 | 200 | .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", | |
| 198 | 202 | }; |
| 199 | 203 | pub var _s84v9o48ucb0 = Package{ |
| 200 | .store = "/git/github.com/nektro/zig-ansi/5f89211a749aef6bf518889c0467ceb24825c055", | |
| 204 | .store = "/git/github.com/nektro/zig-ansi/d1c2ebf3f6c9b0d3aaa74a123d2f0a5657242431", | |
| 201 | 205 | .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", | |
| 203 | 207 | }; |
| 204 | 208 | pub var _f7dubzb7cyqe = Package{ |
| 205 | .store = "/git/github.com/nektro/zig-extras/0cf756c80a4bc1b0459bc81bf8071891f12c3738", | |
| 209 | .store = "/git/github.com/nektro/zig-extras/2cb1b3d619b10f4ad2c870f0359adb0c6129ca67", | |
| 206 | 210 | .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", | |
| 208 | 212 | }; |
| 209 | 213 | pub var _c1xirp1ota5p = Package{ |
| 210 | .store = "/git/github.com/nektro/zig-inquirer/4cddefa42744d61067567b0b36b5d2bb376e5ae3", | |
| 214 | .store = "/git/github.com/nektro/zig-inquirer/3270255ea4c6d919853527e6a73baecfdee6867d", | |
| 211 | 215 | .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", | |
| 213 | 217 | .deps = &[_]*Package{ &_s84v9o48ucb0 }, |
| 214 | 218 | }; |
| 215 | 219 | pub var _96h80ezrvj7i = Package{ |
| 216 | .store = "/git/github.com/nektro/zig-leven/618eddde4ffbc6d34100e4bc6aa654d41161537a", | |
| 220 | .store = "/git/github.com/nektro/zig-leven/d97ef94cacf5c109b7f4b9e01a7e6645d8c8e09a", | |
| 217 | 221 | .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", | |
| 219 | 223 | }; |
| 220 | 224 | pub var _0npcrzfdlrvk = Package{ |
| 221 | .store = "/git/github.com/nektro/zig-licenses/16cef5e32b3f8bbcf1064c599615290a720b6547", | |
| 225 | .store = "/git/github.com/nektro/zig-licenses/f0a95c802d6f955f131dae121550b2ec0acb97ff", | |
| 222 | 226 | .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", | |
| 224 | 233 | }; |
| 225 | 234 | pub var _73bukkeci2u6 = Package{ |
| 226 | .store = "/git/github.com/nektro/zig-sys-darwin/c8ef1a85dfb5e1891454650f88d56bfaa0834304", | |
| 235 | .store = "/git/github.com/nektro/zig-sys-darwin/3565d27455bd6c9f4650ea691cf4de47f9d229e7", | |
| 227 | 236 | .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", | |
| 229 | 238 | }; |
| 230 | 239 | pub var _h7tv7ayhffak = Package{ |
| 231 | .store = "/git/github.com/nektro/zig-sys-linux/7c161d74c77ef9d482bb71273163fd454674240b", | |
| 240 | .store = "/git/github.com/nektro/zig-sys-linux/3f07f214aac54bcf8f84975a2312cd91ac67fa04", | |
| 232 | 241 | .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", | |
| 236 | 243 | }; |
| 237 | 244 | pub var _kscsl0145t7x = Package{ |
| 238 | .store = "/git/github.com/nektro/zig-nio/72fb20a7c5f6f466ced5c3bc731864ee69bc7682", | |
| 245 | .store = "/git/github.com/nektro/zig-nio/42f22d588059efa1e212f97402e94d81d675f28d", | |
| 239 | 246 | .name = "nio", |
| 240 | .entry = "/git/github.com/nektro/zig-nio/72fb20a7c5f6f466ced5c3bc731864ee69bc7682/nio.zig", | |
| 247 | .entry = "/git/github.com/nektro/zig-nio/42f22d588059efa1e212f97402e94d81d675f28d/nio.zig", | |
| 241 | 248 | .deps = &[_]*Package{ &_h7tv7ayhffak, &_f7dubzb7cyqe, &_73bukkeci2u6 }, |
| 242 | 249 | }; |
| 243 | 250 | pub var _7l3oxw6nqqws = Package{ |
| 244 | .store = "/git/github.com/nektro/zig-intrusive-parser/a31b480914d15f3d13cdfb586aac950c73beebdd", | |
| 251 | .store = "/git/github.com/nektro/zig-intrusive-parser/c21ce202c557a710fba6a2333f33bee7bbea114c", | |
| 245 | 252 | .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", | |
| 247 | 254 | .deps = &[_]*Package{ &_f7dubzb7cyqe, &_kscsl0145t7x }, |
| 248 | 255 | }; |
| 249 | 256 | pub var _iecwp4b3bsfm = Package{ |
| 250 | .store = "/git/github.com/nektro/zig-time/0f4db4c980146e4a3fc86a9a9070452a25ff9317", | |
| 257 | .store = "/git/github.com/nektro/zig-time/c05c69b92a00b1afd07cb193f5069250e34ce488", | |
| 251 | 258 | .name = "time", |
| 252 | .entry = "/git/github.com/nektro/zig-time/0f4db4c980146e4a3fc86a9a9070452a25ff9317/time.zig", | |
| 259 | .entry = "/git/github.com/nektro/zig-time/c05c69b92a00b1afd07cb193f5069250e34ce488/time.zig", | |
| 253 | 260 | .deps = &[_]*Package{ &_f7dubzb7cyqe, &_h7tv7ayhffak, &_73bukkeci2u6 }, |
| 254 | 261 | }; |
| 255 | 262 | pub var _vph9l0hxpeze = Package{ |
| 256 | .store = "/git/github.com/nektro/zig-nfs/6743e4e3b03cd3e8175a11f328e530edd054f2f1", | |
| 263 | .store = "/git/github.com/nektro/zig-nfs/4c6b77b141abab5f6ac70ea712521f062b54df65", | |
| 257 | 264 | .name = "nfs", |
| 258 | .entry = "/git/github.com/nektro/zig-nfs/6743e4e3b03cd3e8175a11f328e530edd054f2f1/nfs.zig", | |
| 265 | .entry = "/git/github.com/nektro/zig-nfs/4c6b77b141abab5f6ac70ea712521f062b54df65/nfs.zig", | |
| 259 | 266 | .deps = &[_]*Package{ &_h7tv7ayhffak, &_kscsl0145t7x, &_iecwp4b3bsfm, &_73bukkeci2u6 }, |
| 260 | 267 | }; |
| 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 | }; | |
| 261 | 274 | pub var _ede2wygpe1iy = Package{ |
| 262 | .store = "/git/github.com/nektro/zig-tracer/3a5fdea4ffd387a53ac2a42fb503557cdbe20696", | |
| 275 | .store = "/git/github.com/nektro/zig-tracer/afa0f6df50960f3772b4e0b311ff86521da3e6d5", | |
| 263 | 276 | .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", | |
| 265 | 278 | .deps = &[_]*Package{ &_f7dubzb7cyqe, &_h7tv7ayhffak, &_vph9l0hxpeze, &_kscsl0145t7x, &_iecwp4b3bsfm }, |
| 266 | 279 | }; |
| 267 | 280 | pub var _0k64oe2nuzvj = Package{ |
| 268 | .store = "/git/github.com/nektro/zig-git/2b3f83cd341764f979969603e4f77e62f353b6a3", | |
| 281 | .store = "/git/github.com/nektro/zig-git/8fdfc351842785192cad01aead798d85e25d1a48", | |
| 269 | 282 | .name = "git", |
| 270 | .entry = "/git/github.com/nektro/zig-git/2b3f83cd341764f979969603e4f77e62f353b6a3/git.zig", | |
| 283 | .entry = "/git/github.com/nektro/zig-git/8fdfc351842785192cad01aead798d85e25d1a48/git.zig", | |
| 271 | 284 | .deps = &[_]*Package{ &_iecwp4b3bsfm, &_f7dubzb7cyqe, &_ede2wygpe1iy, &_vph9l0hxpeze, &_kscsl0145t7x, &_0e2d06bb494b }, |
| 272 | 285 | }; |
| 273 | 286 | pub var _ocmr9rtohgcc = Package{ |
| 274 | .store = "/git/github.com/nektro/zig-json/fb918b08846233573467f5df41fcc3b733155663", | |
| 287 | .store = "/git/github.com/nektro/zig-json/27d7354d9dc44982f1de40706721aee7d9c998a5", | |
| 275 | 288 | .name = "json", |
| 276 | .entry = "/git/github.com/nektro/zig-json/fb918b08846233573467f5df41fcc3b733155663/json.zig", | |
| 289 | .entry = "/git/github.com/nektro/zig-json/27d7354d9dc44982f1de40706721aee7d9c998a5/json.zig", | |
| 277 | 290 | .deps = &[_]*Package{ &_f7dubzb7cyqe, &_ede2wygpe1iy, &_7l3oxw6nqqws, &_kscsl0145t7x }, |
| 278 | 291 | }; |
| 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 | }; | |
| 291 | 292 | pub var _g982zq6e8wsv = Package{ |
| 292 | .store = "/git/github.com/nektro/zig-yaml/c20de5ff5a7211007b57f8ae8914319debb473c4", | |
| 293 | .store = "/git/github.com/nektro/zig-yaml/fbf3642e7a9e354e2f48751b69ae1c41c0d7b062", | |
| 293 | 294 | .name = "yaml", |
| 294 | .entry = "/git/github.com/nektro/zig-yaml/c20de5ff5a7211007b57f8ae8914319debb473c4/yaml.zig", | |
| 295 | .entry = "/git/github.com/nektro/zig-yaml/fbf3642e7a9e354e2f48751b69ae1c41c0d7b062/yaml.zig", | |
| 295 | 296 | .deps = &[_]*Package{ &_8mdbh0zuneb0 }, |
| 296 | 297 | }; |
| 297 | 298 | pub var _0e2d06bb494b = Package{ |
| ... | ... | @@ -307,9 +308,9 @@ pub const package_data = struct { |
| 307 | 308 | .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" }, |
| 308 | 309 | }; |
| 309 | 310 | pub var _2ta738wrqbaq = Package{ |
| 310 | .store = "/git/github.com/ziglibs/known-folders/aa24df42183ad415d10bc0a33e6238c437fc0f59", | |
| 311 | .store = "/git/github.com/ziglibs/known-folders/83d39161eac2ed6f37ad3cb4d9dd518696ce90bb", | |
| 311 | 312 | .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", | |
| 313 | 314 | }; |
| 314 | 315 | pub var _89ujp8gq842x = Package{ |
| 315 | 316 | .name = "zigmod", |
| ... | ... | @@ -326,6 +327,7 @@ pub const packages = [_]*Package{ |
| 326 | 327 | &package_data._f7dubzb7cyqe, |
| 327 | 328 | &package_data._s84v9o48ucb0, |
| 328 | 329 | &package_data._kscsl0145t7x, |
| 330 | &package_data._vph9l0hxpeze, | |
| 329 | 331 | }; |
| 330 | 332 | |
| 331 | 333 | pub const pkgs = struct { |
| ... | ... | @@ -334,6 +336,7 @@ pub const pkgs = struct { |
| 334 | 336 | pub const extras = &package_data._f7dubzb7cyqe; |
| 335 | 337 | pub const ansi = &package_data._s84v9o48ucb0; |
| 336 | 338 | pub const nio = &package_data._kscsl0145t7x; |
| 339 | pub const nfs = &package_data._vph9l0hxpeze; | |
| 337 | 340 | }; |
| 338 | 341 | |
| 339 | 342 | pub const imports = struct { |
docs/README.md+1-1| ... | ... | @@ -10,7 +10,7 @@ The rest of this documentation will assume you already have Zig installed. |
| 10 | 10 | |
| 11 | 11 | 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. |
| 12 | 12 | |
| 13 | The earliest Zig release this Zigmod was verified to work with is `0.14.1`. | |
| 13 | The earliest Zig release this Zigmod was verified to work with is `0.15.2`. | |
| 14 | 14 | |
| 15 | 15 | ## Download |
| 16 | 16 | You 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] |
| 22 | 22 | ``` |
| 23 | 23 | $ zigmod install git https://github.com/nektro/zigmod |
| 24 | 24 | debug: modpath: /home/me/.cache/zigmod/deps/git/github.com/nektro/zigmod |
| 25 | debug: argv: { /home/me/.local/share/zig/0.14.1/zig, build, --prefix, /home/me/.zigmod } | |
| 25 | debug: argv: { /home/me/.local/share/zig/0.15.2/zig, build, --prefix, /home/me/.zigmod } | |
| 26 | 26 | info: success! |
| 27 | 27 | ``` |
licenses.txt-3| ... | ... | @@ -29,6 +29,3 @@ MPL-2.0: |
| 29 | 29 | Zlib: |
| 30 | 30 | = https://spdx.org/licenses/Zlib |
| 31 | 31 | - git https://github.com/madler/zlib |
| 32 | ||
| 33 | Unspecified: | |
| 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 |
| 28 | 28 | }; |
| 29 | 29 | const top_module = try common.collect_deps_deep(cachepath, dir, &options); |
| 30 | 30 | |
| 31 | var list = std.ArrayList(zigmod.Module).init(alloc); | |
| 31 | var list = std.array_list.Managed(zigmod.Module).init(alloc); | |
| 32 | 32 | try common.collect_pkgs(top_module, &list); |
| 33 | 33 | |
| 34 | 34 | 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 { |
| 34 | 34 | }; |
| 35 | 35 | const top_module = try common.collect_deps_deep(cachepath, dir, &options); |
| 36 | 36 | |
| 37 | var seencache = std.ArrayList([48]u8).init(gpa); | |
| 37 | var seencache = std.array_list.Managed([48]u8).init(gpa); | |
| 38 | 38 | defer seencache.deinit(); |
| 39 | 39 | |
| 40 | const stdout = std.io.getStdOut(); | |
| 41 | const w = stdout.writer(); | |
| 40 | const w = nfs.stdout(); | |
| 42 | 41 | |
| 43 | 42 | switch (format) { |
| 44 | 43 | .tree => { |
| ... | ... | @@ -59,14 +58,14 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void { |
| 59 | 58 | fn printTree(writer: anytype, module: zigmod.Module, depth: u16) !void { |
| 60 | 59 | try writer.writeByteNTimes('\t', depth); |
| 61 | 60 | try writer.writeAll(module.name); |
| 62 | try writer.writeByte('\n'); | |
| 61 | try writer.writeAll("\n"); | |
| 63 | 62 | |
| 64 | 63 | for (module.deps) |dep| { |
| 65 | 64 | try printTree(writer, dep, depth + 1); |
| 66 | 65 | } |
| 67 | 66 | } |
| 68 | 67 | |
| 69 | fn printMermaid(writer: anytype, module: zigmod.Module, seencache: *std.ArrayList([48]u8)) !void { | |
| 68 | fn printMermaid(writer: anytype, module: zigmod.Module, seencache: *std.array_list.Managed([48]u8)) !void { | |
| 70 | 69 | for (seencache.items) |item| { |
| 71 | 70 | if (std.mem.eql(u8, &module.id, &item)) { |
| 72 | 71 | return; |
| ... | ... | @@ -83,7 +82,7 @@ fn printMermaid(writer: anytype, module: zigmod.Module, seencache: *std.ArrayLis |
| 83 | 82 | } |
| 84 | 83 | } |
| 85 | 84 | |
| 86 | fn printDot(writer: anytype, module: zigmod.Module, seencache: *std.ArrayList([48]u8)) !void { | |
| 85 | fn printDot(writer: anytype, module: zigmod.Module, seencache: *std.array_list.Managed([48]u8)) !void { | |
| 87 | 86 | for (seencache.items) |item| { |
| 88 | 87 | if (std.mem.eql(u8, &module.id, &item)) { |
| 89 | 88 | return; |
src/cmd/fetch.zig+11-10| ... | ... | @@ -27,7 +27,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void { |
| 27 | 27 | }; |
| 28 | 28 | const top_module = try common.collect_deps_deep(cachepath, dir, &options); |
| 29 | 29 | |
| 30 | var list = std.ArrayList(zigmod.Module).init(gpa); | |
| 30 | var list = std.array_list.Managed(zigmod.Module).init(gpa); | |
| 31 | 31 | try common.collect_pkgs(top_module, &list); |
| 32 | 32 | |
| 33 | 33 | try create_depszig(gpa, cachepath, dir, top_module, &list); |
| ... | ... | @@ -44,7 +44,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void { |
| 44 | 44 | try license.do(cachepath, dir, &options, outfile); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: nfs.Dir, top_module: zigmod.Module, list: *std.ArrayList(zigmod.Module)) !void { | |
| 47 | 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 { | |
| 48 | 48 | const f = try dir.createFile("deps.zig", .{}); |
| 49 | 49 | defer f.close(); |
| 50 | 50 | |
| ... | ... | @@ -107,6 +107,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: nfs.Dir, |
| 107 | 107 | \\ switch (jtem) { |
| 108 | 108 | \\ .path => result.addIncludePath(jtem.path), |
| 109 | 109 | \\ .path_system, .path_after, .framework_path, .framework_path_system, .other_step, .config_header_step => {}, |
| 110 | \\ .embed_path => {}, | |
| 110 | 111 | \\ } |
| 111 | 112 | \\ } |
| 112 | 113 | \\ } |
| ... | ... | @@ -120,7 +121,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: nfs.Dir, |
| 120 | 121 | \\ link_lib_c = true; |
| 121 | 122 | \\ } |
| 122 | 123 | \\ 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; | |
| 124 | 125 | \\ result.linkSystemLibrary(item, .{}); |
| 125 | 126 | \\ exe.linkSystemLibrary(item); |
| 126 | 127 | \\ link_lib_c = true; |
| ... | ... | @@ -145,7 +146,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: nfs.Dir, |
| 145 | 146 | try w.print( |
| 146 | 147 | \\fn checkMinZig(current: std.SemanticVersion, exe: *std.Build.Step.Compile) void {{ |
| 147 | 148 | \\ 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}})); | |
| 149 | 150 | \\}} |
| 150 | 151 | \\ |
| 151 | 152 | \\ |
| ... | ... | @@ -156,8 +157,8 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: nfs.Dir, |
| 156 | 157 | try w.writeAll("};\n\n"); |
| 157 | 158 | |
| 158 | 159 | 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); | |
| 161 | 162 | for (list.items) |mod| { |
| 162 | 163 | if (mod.type == .system_lib or mod.type == .framework) { |
| 163 | 164 | continue; |
| ... | ... | @@ -180,7 +181,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: nfs.Dir, |
| 180 | 181 | try w.writeAll("};\n"); |
| 181 | 182 | } |
| 182 | 183 | |
| 183 | fn create_lockfile(alloc: std.mem.Allocator, list: *std.ArrayList(zigmod.Module), path: string, dir: nfs.Dir) !void { | |
| 184 | fn create_lockfile(alloc: std.mem.Allocator, list: *std.array_list.Managed(zigmod.Module), path: string, dir: nfs.Dir) !void { | |
| 184 | 185 | const fl = try dir.createFile("zigmod.lock", .{}); |
| 185 | 186 | defer fl.close(); |
| 186 | 187 | |
| ... | ... | @@ -214,8 +215,8 @@ fn diff_lockfile(alloc: std.mem.Allocator) !void { |
| 214 | 215 | if (std.mem.startsWith(u8, line, "@@")) break; |
| 215 | 216 | } |
| 216 | 217 | |
| 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); | |
| 219 | 220 | while (try r.readUntilDelimiterOrEofAlloc(alloc, '\n', max)) |line_full| { |
| 220 | 221 | const line = line_full[0 .. line_full.len - 1]; |
| 221 | 222 | if (line[0] == ' ') continue; |
| ... | ... | @@ -322,7 +323,7 @@ fn print_deps(w: nfs.File, m: zigmod.Module) !void { |
| 322 | 323 | try w.writeAll("}"); |
| 323 | 324 | } |
| 324 | 325 | |
| 325 | fn print_pkg_data_to(w: nfs.File, notdone: *std.ArrayList(zigmod.Module), done: *std.ArrayList(zigmod.Module)) !void { | |
| 326 | fn print_pkg_data_to(w: nfs.File, notdone: *std.array_list.Managed(zigmod.Module), done: *std.array_list.Managed(zigmod.Module)) !void { | |
| 326 | 327 | var len: usize = notdone.items.len; |
| 327 | 328 | while (notdone.items.len > 0) { |
| 328 | 329 | 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 { |
| 27 | 27 | }; |
| 28 | 28 | const top_module = try common.collect_deps_deep(cachepath, dir, &options); |
| 29 | 29 | |
| 30 | var list = std.ArrayList(zigmod.Module).init(gpa); | |
| 30 | var list = std.array_list.Managed(zigmod.Module).init(gpa); | |
| 31 | 31 | try common.collect_pkgs(top_module, &list); |
| 32 | 32 | |
| 33 | 33 | 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 |
| 162 | 162 | \\ .target = exe.root_module.resolved_target, |
| 163 | 163 | \\ }); |
| 164 | 164 | \\ const target = result.resolved_target.?.result; |
| 165 | \\ const dummy_library = b.addStaticLibrary(.{ | |
| 165 | \\ const dummy_library = b.addLibrary(.{ | |
| 166 | \\ .linkage = .static, | |
| 166 | 167 | \\ .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 | \\ }), | |
| 169 | 172 | \\ }); |
| 170 | 173 | \\ dummy_library.step.dependOn(fetch_step); |
| 171 | 174 | \\ var links: u32 = 0; |
| ... | ... | @@ -181,6 +184,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: [:0]const u8, dir: nf |
| 181 | 184 | \\ switch (jtem) { |
| 182 | 185 | \\ .path => result.addIncludePath(jtem.path), |
| 183 | 186 | \\ .path_system, .path_after, .framework_path, .framework_path_system, .other_step, .config_header_step => {}, |
| 187 | \\ .embed_path => {}, | |
| 184 | 188 | \\ } |
| 185 | 189 | \\ } |
| 186 | 190 | \\ } |
| ... | ... | @@ -195,7 +199,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: [:0]const u8, dir: nf |
| 195 | 199 | \\ links += 1; |
| 196 | 200 | \\ } |
| 197 | 201 | \\ for (self.system_libs) |item| { |
| 198 | \\ if (std.zig.target.isLibCLibName(target, item)) continue; | |
| 202 | \\ if (std.zig.target.isLibCLibName(&target, item)) continue; | |
| 199 | 203 | \\ dummy_library.linkSystemLibrary(item); |
| 200 | 204 | \\ links += 1; |
| 201 | 205 | \\ } |
| ... | ... | @@ -222,15 +226,15 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: [:0]const u8, dir: nf |
| 222 | 226 | try w.print( |
| 223 | 227 | \\fn checkMinZig(current: std.SemanticVersion, exe: *std.Build.Step.Compile) void {{ |
| 224 | 228 | \\ 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}})); | |
| 226 | 230 | \\}} |
| 227 | 231 | \\ |
| 228 | 232 | \\ |
| 229 | 233 | , .{if (top_module.minZigVersion()) |sv| u.altSemanticVersion(sv) else null}); |
| 230 | 234 | |
| 231 | 235 | 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); | |
| 234 | 238 | for (list) |mod| { |
| 235 | 239 | if (mod.type == .system_lib or mod.type == .framework) { |
| 236 | 240 | continue; |
| ... | ... | @@ -278,7 +282,7 @@ fn print_deps(w: nfs.File, m: zigmod.Module) !void { |
| 278 | 282 | try w.writeAll("}"); |
| 279 | 283 | } |
| 280 | 284 | |
| 281 | fn 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 { | |
| 285 | fn 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 { | |
| 282 | 286 | var len: usize = notdone.items.len; |
| 283 | 287 | while (notdone.items.len > 0) { |
| 284 | 288 | 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 { |
| 45 | 45 | }) else null; |
| 46 | 46 | const entry = if (entry_bare) |ent| try gpa.dupeZ(u8, ent) else null; |
| 47 | 47 | |
| 48 | const maybe_license_text = try detectlicense.detectInDir(gpa, cwd.to_std()); | |
| 48 | const maybe_license_text = try detectlicense.detectInDir(gpa, cwd); | |
| 49 | 49 | const license = try inquirer.forString(stdout, stdin, "license:", gpa, maybe_license_text); |
| 50 | 50 | |
| 51 | 51 | 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 { |
| 312 | 312 | }; |
| 313 | 313 | const top_module = try common.collect_deps_deep(cachepath, dir, &options); |
| 314 | 314 | |
| 315 | var list = std.ArrayList(zigmod.Module).init(alloc); | |
| 315 | var list = std.array_list.Managed(zigmod.Module).init(alloc); | |
| 316 | 316 | try common.collect_pkgs(top_module, &list); |
| 317 | 317 | |
| 318 | 318 | 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 { |
| 73 | 73 | zigpath, "build", |
| 74 | 74 | "--prefix", try std.fs.path.join(gpa, &.{ homepath, ".zigmod" }), |
| 75 | 75 | }; |
| 76 | std.log.debug("argv: {s}", .{argv}); | |
| 76 | logargv(argv) catch return; | |
| 77 | 77 | var proc = std.process.Child.init(argv, gpa); |
| 78 | 78 | proc.cwd = modpath; |
| 79 | 79 | const term = try proc.spawnAndWait(); |
| ... | ... | @@ -85,3 +85,18 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void { |
| 85 | 85 | } |
| 86 | 86 | std.log.info("success!", .{}); |
| 87 | 87 | } |
| 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' | |
| 91 | fn 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"); |
| 10 | 10 | const u = @import("./../util/funcs.zig"); |
| 11 | 11 | const common = @import("./../common.zig"); |
| 12 | 12 | |
| 13 | const List = std.ArrayList(zigmod.Module); | |
| 13 | const List = std.array_list.Managed(zigmod.Module); | |
| 14 | 14 | const Map = std.StringArrayHashMap(*List); |
| 15 | 15 | |
| 16 | 16 | // Inspired by: |
src/cmd/sum.zig+1-1| ... | ... | @@ -29,7 +29,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void { |
| 29 | 29 | const w = f; |
| 30 | 30 | |
| 31 | 31 | // |
| 32 | var module_list = std.ArrayList(zigmod.Module).init(gpa); | |
| 32 | var module_list = std.array_list.Managed(zigmod.Module).init(gpa); | |
| 33 | 33 | try common.collect_pkgs(top_module, &module_list); |
| 34 | 34 | |
| 35 | 35 | 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 { |
| 18 | 18 | var gitversion = u.git_rev_HEAD(gpa, nfs.cwd()) catch ""; |
| 19 | 19 | gitversion = if (gitversion.len > 0) gitversion[0..9] else gitversion; |
| 20 | 20 | |
| 21 | const stdout = std.io.getStdOut(); | |
| 22 | const w = stdout.writer(); | |
| 21 | const stdout = nfs.stdout(); | |
| 22 | const w = stdout; | |
| 23 | 23 | |
| 24 | 24 | try w.writeAll("zigmod"); |
| 25 | 25 |
src/cmd/zpm.zig+9-10| ... | ... | @@ -61,22 +61,21 @@ pub fn server_fetch(url: string) !json.Document { |
| 61 | 61 | var client: std.http.Client = .{ .allocator = gpa }; |
| 62 | 62 | defer client.deinit(); |
| 63 | 63 | |
| 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" } }, | |
| 66 | 66 | }); |
| 67 | 67 | 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 }); | |
| 73 | 72 | } |
| 74 | 73 | |
| 75 | 74 | pub fn server_fetchArray(url: string) ![]const Package { |
| 76 | 75 | const doc = try server_fetch(url); |
| 77 | 76 | doc.acquire(); |
| 78 | 77 | defer doc.release(); |
| 79 | var list = std.ArrayList(Package).init(gpa); | |
| 78 | var list = std.array_list.Managed(Package).init(gpa); | |
| 80 | 79 | errdefer list.deinit(); |
| 81 | 80 | |
| 82 | 81 | for (doc.root.array()) |item| { |
| ... | ... | @@ -97,7 +96,7 @@ pub fn server_fetchArray(url: string) ![]const Package { |
| 97 | 96 | } |
| 98 | 97 | |
| 99 | 98 | fn valueStrArray(vals: json.Array) ![]string { |
| 100 | var list = std.ArrayList(string).init(gpa); | |
| 99 | var list = std.array_list.Managed(string).init(gpa); | |
| 101 | 100 | errdefer list.deinit(); |
| 102 | 101 | |
| 103 | 102 | for (vals) |item| { |
| ... | ... | @@ -108,7 +107,7 @@ fn valueStrArray(vals: json.Array) ![]string { |
| 108 | 107 | } |
| 109 | 108 | |
| 110 | 109 | fn valueLinks(vals: json.ObjectIndex) ![]string { |
| 111 | var list = std.ArrayList(string).init(gpa); | |
| 110 | var list = std.array_list.Managed(string).init(gpa); | |
| 112 | 111 | errdefer list.deinit(); |
| 113 | 112 | |
| 114 | 113 | 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 { |
| 42 | 42 | } |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | var buf: [4096]u8 = @splat(0); | |
| 45 | // var buf: [4096]u8 = @splat(0); | |
| 46 | 46 | var client: std.http.Client = .{ .allocator = gpa }; |
| 47 | 47 | defer client.deinit(); |
| 48 | 48 | |
| 49 | 49 | const has_zigdotmod = blk: { |
| 50 | 50 | 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" } }, | |
| 53 | 53 | }); |
| 54 | 54 | 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; | |
| 59 | 58 | }; |
| 60 | 59 | const has_zigmodyml = blk: { |
| 61 | 60 | 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" } }, | |
| 64 | 63 | }); |
| 65 | 64 | 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; | |
| 70 | 68 | }; |
| 71 | 69 | |
| 72 | 70 | _, const file = try zigmod.ModFile.openFile(nfs.cwd(), .{ .mode = .read_write }); |
src/cmd/zpm/search.zig+2-1| ... | ... | @@ -1,6 +1,7 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const gpa = std.heap.c_allocator; |
| 3 | 3 | const extras = @import("extras"); |
| 4 | const nfs = @import("nfs"); | |
| 4 | 5 | |
| 5 | 6 | const zpm = @import("./../zpm.zig"); |
| 6 | 7 | |
| ... | ... | @@ -11,7 +12,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void { |
| 11 | 12 | _ = self_name; |
| 12 | 13 | _ = args; |
| 13 | 14 | |
| 14 | const out = std.io.getStdOut().writer(); | |
| 15 | const out = nfs.stdout(); | |
| 15 | 16 | |
| 16 | 17 | const url = try std.mem.join(gpa, "/", &.{ zpm.server_root, "packages" }); |
| 17 | 18 | const list = try zpm.server_fetchArray(url); |
src/cmd/zpm/showjson.zig+2-1| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const gpa = std.heap.c_allocator; |
| 3 | const nfs = @import("nfs"); | |
| 3 | 4 | |
| 4 | 5 | const zpm = @import("./../zpm.zig"); |
| 5 | 6 | |
| ... | ... | @@ -9,7 +10,7 @@ const zpm = @import("./../zpm.zig"); |
| 9 | 10 | pub fn execute(self_name: []const u8, args: [][:0]u8) !void { |
| 10 | 11 | _ = self_name; |
| 11 | 12 | |
| 12 | const out = std.io.getStdOut().writer(); | |
| 13 | const out = nfs.stdout(); | |
| 13 | 14 | |
| 14 | 15 | const url = try std.mem.join(gpa, "/", &.{ zpm.server_root, args[0] }); |
| 15 | 16 | const doc = try zpm.server_fetch(url); |
src/cmd/zpm/tags.zig+2-1| ... | ... | @@ -1,6 +1,7 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const gpa = std.heap.c_allocator; |
| 3 | 3 | const extras = @import("extras"); |
| 4 | const nfs = @import("nfs"); | |
| 4 | 5 | |
| 5 | 6 | const zpm = @import("./../zpm.zig"); |
| 6 | 7 | |
| ... | ... | @@ -11,7 +12,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void { |
| 11 | 12 | _ = self_name; |
| 12 | 13 | _ = args; |
| 13 | 14 | |
| 14 | const out = std.io.getStdOut().writer(); | |
| 15 | const out = nfs.stdout(); | |
| 15 | 16 | |
| 16 | 17 | const url = try std.mem.join(gpa, "/", &.{ zpm.server_root, "tags" }); |
| 17 | 18 | const doc = try zpm.server_fetch(url); |
src/common.zig+7-7| ... | ... | @@ -19,11 +19,11 @@ pub const CollectOptions = struct { |
| 19 | 19 | update: bool, |
| 20 | 20 | lock: ?[]const [4]string = null, |
| 21 | 21 | alloc: std.mem.Allocator, |
| 22 | already_fetched: *std.ArrayList(string) = undefined, | |
| 22 | already_fetched: *std.array_list.Managed(string) = undefined, | |
| 23 | 23 | |
| 24 | 24 | 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); | |
| 27 | 27 | } |
| 28 | 28 | }; |
| 29 | 29 | |
| ... | ... | @@ -32,7 +32,7 @@ pub fn collect_deps_deep(cachepath: [:0]const u8, mdir: nfs.Dir, options: *Colle |
| 32 | 32 | |
| 33 | 33 | const m = try zigmod.ModFile.from_dir(options.alloc, mdir, "."); |
| 34 | 34 | 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); | |
| 36 | 36 | errdefer moduledeps.deinit(); |
| 37 | 37 | if (m.root_files.len > 0) { |
| 38 | 38 | 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 |
| 65 | 65 | try nfs.cwd().makePath(cachepath); |
| 66 | 66 | |
| 67 | 67 | 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); | |
| 69 | 69 | errdefer moduledeps.deinit(); |
| 70 | 70 | if (m.files.len > 0) { |
| 71 | 71 | 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 |
| 91 | 91 | }; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | pub fn collect_pkgs(mod: zigmod.Module, list: *std.ArrayList(zigmod.Module)) anyerror!void { | |
| 94 | pub fn collect_pkgs(mod: zigmod.Module, list: *std.array_list.Managed(zigmod.Module)) anyerror!void { | |
| 95 | 95 | if (extras.containsAggregate(zigmod.Module, list.items, mod)) { |
| 96 | 96 | return; |
| 97 | 97 | } |
| ... | ... | @@ -336,7 +336,7 @@ pub fn gen_files_package(alloc: std.mem.Allocator, cachepath: string, mdir: nfs. |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | pub 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); | |
| 340 | 340 | const max = std.math.maxInt(usize); |
| 341 | 341 | if (!try dir.exists("zigmod.lock")) return &[_][4]string{}; |
| 342 | 342 | var f = try dir.openFile("zigmod.lock", .{}); |
src/main.zig+4-3| ... | ... | @@ -5,6 +5,7 @@ pub const build_options = @import("build_options"); |
| 5 | 5 | const zigmod = @import("zigmod"); |
| 6 | 6 | const win32 = @import("win32"); |
| 7 | 7 | const nio = @import("nio"); |
| 8 | const nfs = @import("nfs"); | |
| 8 | 9 | |
| 9 | 10 | // |
| 10 | 11 | // |
| ... | ... | @@ -56,7 +57,7 @@ pub fn main() !void { |
| 56 | 57 | } |
| 57 | 58 | } |
| 58 | 59 | |
| 59 | var sub_cmd_args = std.ArrayList(string).init(gpa); | |
| 60 | var sub_cmd_args = std.array_list.Managed(string).init(gpa); | |
| 60 | 61 | try sub_cmd_args.append(try nio.fmt.allocPrint(gpa, "zigmod-{s}", .{args[0]})); |
| 61 | 62 | for (args[1..]) |item| { |
| 62 | 63 | try sub_cmd_args.append(item); |
| ... | ... | @@ -67,8 +68,8 @@ pub fn main() !void { |
| 67 | 68 | fail("unknown command \"{s}\" for \"zigmod\"", .{args[0]}); |
| 68 | 69 | }, |
| 69 | 70 | }; |
| 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); | |
| 72 | 73 | } |
| 73 | 74 | |
| 74 | 75 | // |
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 { |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | pub 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); | |
| 38 | 38 | errdefer list.deinit(); |
| 39 | 39 | |
| 40 | 40 | var iter = std.mem.splitScalar(u8, in, delim); |
| ... | ... | @@ -47,7 +47,7 @@ pub fn split(alloc: std.mem.Allocator, in: string, delim: u8) ![]string { |
| 47 | 47 | pub fn file_list(alloc: std.mem.Allocator, dpath: [:0]const u8) ![][:0]u8 { |
| 48 | 48 | var dir = try nfs.cwd().openDir(dpath, .{}); |
| 49 | 49 | defer dir.close(); |
| 50 | var list = std.ArrayList([:0]u8).init(alloc); | |
| 50 | var list = std.array_list.Managed([:0]u8).init(alloc); | |
| 51 | 51 | errdefer list.deinit(); |
| 52 | 52 | errdefer for (list.items) |x| alloc.free(x); |
| 53 | 53 | var walker = try dir.walk(alloc); |
| ... | ... | @@ -76,7 +76,7 @@ pub fn run_cmd(alloc: std.mem.Allocator, dir: ?string, args: []const string) !u3 |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | pub 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); | |
| 80 | 80 | errdefer list.deinit(); |
| 81 | 81 | for (input) |item| { |
| 82 | 82 | if (!std.mem.eql(u8, item, search)) { |
| ... | ... | @@ -249,7 +249,6 @@ const StringEscape = struct { |
| 249 | 249 | ' ', '!', '#'...'&', '('...'[', ']'...'~' => try writer.writeAll(&.{c}), |
| 250 | 250 | else => { |
| 251 | 251 | try writer.print("\\x{x:0>2}", .{c}); |
| 252 | // try writer.printInt(c, 16, .lower, .{ .width = 2, .fill = '0' }); | |
| 253 | 252 | }, |
| 254 | 253 | }; |
| 255 | 254 | } |
src/util/modfile.zig+1-1| ... | ... | @@ -95,7 +95,7 @@ pub const ModFile = struct { |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | 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); | |
| 99 | 99 | errdefer dep_list.deinit(); |
| 100 | 100 | |
| 101 | 101 | for (props) |prop| { |
src/util/module.zig+2-2| ... | ... | @@ -33,7 +33,7 @@ pub const Module = struct { |
| 33 | 33 | pub const ROOT: [48]u8 = ("root" ++ (" " ** 44)).*; |
| 34 | 34 | |
| 35 | 35 | 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); | |
| 37 | 37 | errdefer moddeps.deinit(); |
| 38 | 38 | |
| 39 | 39 | for (dep.deps) |*d| { |
| ... | ... | @@ -71,7 +71,7 @@ pub const Module = struct { |
| 71 | 71 | pub fn get_hash(self: Module, alloc: std.mem.Allocator, cdpath: string) !string { |
| 72 | 72 | const file_list_1 = try u.file_list(alloc, try std.mem.concatWithSentinel(alloc, u8, &.{ cdpath, "/", self.clean_path }, 0)); |
| 73 | 73 | |
| 74 | var file_list_2 = std.ArrayList(string).init(alloc); | |
| 74 | var file_list_2 = std.array_list.Managed(string).init(alloc); | |
| 75 | 75 | errdefer file_list_2.deinit(); |
| 76 | 76 | for (file_list_1) |item| { |
| 77 | 77 | const _a = extras.trimPrefix(item, cdpath); |
zig.mod+3-2| ... | ... | @@ -3,7 +3,7 @@ name: zigmod |
| 3 | 3 | main: src/lib.zig |
| 4 | 4 | license: MIT |
| 5 | 5 | description: A package manager for the Zig programming language. |
| 6 | min_zig_version: 0.14.1 | |
| 6 | min_zig_version: 0.15.2 | |
| 7 | 7 | min_zigmod_version: r96 |
| 8 | 8 | dependencies: |
| 9 | 9 | - src: git https://github.com/nektro/zig-yaml |
| ... | ... | @@ -13,7 +13,7 @@ dependencies: |
| 13 | 13 | name: known-folders |
| 14 | 14 | main: known-folders.zig |
| 15 | 15 | license: MIT |
| 16 | version: commit-aa24df42183ad415d10bc0a33e6238c437fc0f59 | |
| 16 | version: commit-83d39161eac2ed6f37ad3cb4d9dd518696ce90bb | |
| 17 | 17 | - src: git https://github.com/nektro/zig-licenses |
| 18 | 18 | - src: git https://github.com/nektro/zig-detect-license |
| 19 | 19 | - src: git https://github.com/nektro/zig-inquirer |
| ... | ... | @@ -35,3 +35,4 @@ root_dependencies: |
| 35 | 35 | - src: git https://github.com/nektro/zig-extras |
| 36 | 36 | - src: git https://github.com/nektro/zig-ansi |
| 37 | 37 | - 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 @@ |
| 1 | 1 | 2 |
| 2 | 2 | git https://github.com/marlersoft/zigwin32 commit-ec98bb4d9eea532320a8551720a9e3ec6de64994 |
| 3 | git https://github.com/nektro/arqv-ini commit-ab427a4de4f875eaa39ee56a29114fc020431546 | |
| 4 | git https://github.com/nektro/zig-ansi commit-5f89211a749aef6bf518889c0467ceb24825c055 | |
| 5 | git https://github.com/nektro/zig-detect-license commit-a1a066da88dab50873a56f0349dc12dc76542077 | |
| 6 | git https://github.com/nektro/zig-extras commit-0cf756c80a4bc1b0459bc81bf8071891f12c3738 | |
| 7 | git https://github.com/nektro/zig-git commit-2b3f83cd341764f979969603e4f77e62f353b6a3 | |
| 8 | git https://github.com/nektro/zig-inquirer commit-4cddefa42744d61067567b0b36b5d2bb376e5ae3 | |
| 9 | git https://github.com/nektro/zig-intrusive-parser commit-a31b480914d15f3d13cdfb586aac950c73beebdd | |
| 10 | git https://github.com/nektro/zig-json commit-fb918b08846233573467f5df41fcc3b733155663 | |
| 11 | git https://github.com/nektro/zig-leven commit-618eddde4ffbc6d34100e4bc6aa654d41161537a | |
| 12 | git https://github.com/nektro/zig-licenses commit-16cef5e32b3f8bbcf1064c599615290a720b6547 | |
| 13 | git https://github.com/nektro/zig-licenses-text commit-ba0f00dfb23d28c301e4b54d0a278def2c38dc7b | |
| 14 | git https://github.com/nektro/zig-nfs commit-6743e4e3b03cd3e8175a11f328e530edd054f2f1 | |
| 15 | git https://github.com/nektro/zig-nio commit-72fb20a7c5f6f466ced5c3bc731864ee69bc7682 | |
| 16 | git https://github.com/nektro/zig-sys-darwin commit-c8ef1a85dfb5e1891454650f88d56bfaa0834304 | |
| 17 | git https://github.com/nektro/zig-sys-linux commit-7c161d74c77ef9d482bb71273163fd454674240b | |
| 18 | git https://github.com/nektro/zig-time commit-0f4db4c980146e4a3fc86a9a9070452a25ff9317 | |
| 19 | git https://github.com/nektro/zig-tracer commit-3a5fdea4ffd387a53ac2a42fb503557cdbe20696 | |
| 20 | git https://github.com/nektro/zig-yaml commit-c20de5ff5a7211007b57f8ae8914319debb473c4 | |
| 3 | git https://github.com/nektro/arqv-ini commit-e229c738bbf5cf0d5464bf9178c17813069a7028 | |
| 4 | git https://github.com/nektro/zig-ansi commit-d1c2ebf3f6c9b0d3aaa74a123d2f0a5657242431 | |
| 5 | git https://github.com/nektro/zig-detect-license commit-e8ea5d969e1062d0be161f7a70e293b52aebc3f3 | |
| 6 | git https://github.com/nektro/zig-extras commit-2cb1b3d619b10f4ad2c870f0359adb0c6129ca67 | |
| 7 | git https://github.com/nektro/zig-git commit-8fdfc351842785192cad01aead798d85e25d1a48 | |
| 8 | git https://github.com/nektro/zig-inquirer commit-3270255ea4c6d919853527e6a73baecfdee6867d | |
| 9 | git https://github.com/nektro/zig-intrusive-parser commit-c21ce202c557a710fba6a2333f33bee7bbea114c | |
| 10 | git https://github.com/nektro/zig-json commit-27d7354d9dc44982f1de40706721aee7d9c998a5 | |
| 11 | git https://github.com/nektro/zig-leven commit-d97ef94cacf5c109b7f4b9e01a7e6645d8c8e09a | |
| 12 | git https://github.com/nektro/zig-licenses commit-f0a95c802d6f955f131dae121550b2ec0acb97ff | |
| 13 | git https://github.com/nektro/zig-licenses-text commit-88dc9ae4c338c652dc231ea477b8e0b56ac36743 | |
| 14 | git https://github.com/nektro/zig-nfs commit-4c6b77b141abab5f6ac70ea712521f062b54df65 | |
| 15 | git https://github.com/nektro/zig-nio commit-42f22d588059efa1e212f97402e94d81d675f28d | |
| 16 | git https://github.com/nektro/zig-sys-darwin commit-3565d27455bd6c9f4650ea691cf4de47f9d229e7 | |
| 17 | git https://github.com/nektro/zig-sys-linux commit-3f07f214aac54bcf8f84975a2312cd91ac67fa04 | |
| 18 | git https://github.com/nektro/zig-time commit-c05c69b92a00b1afd07cb193f5069250e34ce488 | |
| 19 | git https://github.com/nektro/zig-tracer commit-afa0f6df50960f3772b4e0b311ff86521da3e6d5 | |
| 20 | git https://github.com/nektro/zig-yaml commit-fbf3642e7a9e354e2f48751b69ae1c41c0d7b062 | |
| 21 | 21 | git https://github.com/madler/zlib tag-v1.3.2 |
| 22 | 22 | git https://github.com/yaml/libyaml tag-0.2.5 |
| 23 | git https://github.com/ziglibs/known-folders commit-aa24df42183ad415d10bc0a33e6238c437fc0f59 | |
| 23 | git https://github.com/ziglibs/known-folders commit-83d39161eac2ed6f37ad3cb4d9dd518696ce90bb |