| author | |
| committer | |
| log | 50ccfe3d1d84b4f27a4bb66fd4321623663a0163 |
| tree | ea506efe4f98adc203eccd6a583d1c8544cd3c6f |
| parent | 21b73b05d10bc8aaf98724c0970be67249c5a0bf |
17 files changed, 66 insertions(+), 74 deletions(-)
.github/workflows/nightly.yml+1-1| ... | ... | @@ -26,7 +26,7 @@ jobs: |
| 26 | 26 | - name: Setup Zig |
| 27 | 27 | uses: goto-bus-stop/setup-zig@v2 |
| 28 | 28 | with: |
| 29 | version: "0.11.0-dev.3652+f5043ad6a" | |
| 29 | version: "0.11.0" | |
| 30 | 30 | |
| 31 | 31 | - run: zig version |
| 32 | 32 | - run: zig env |
.github/workflows/push.yml+1-1| ... | ... | @@ -19,7 +19,7 @@ jobs: |
| 19 | 19 | - name: Setup Zig |
| 20 | 20 | uses: goto-bus-stop/setup-zig@v2 |
| 21 | 21 | with: |
| 22 | version: "0.11.0-dev.3652+f5043ad6a" | |
| 22 | version: "0.11.0" | |
| 23 | 23 | |
| 24 | 24 | - run: zig version |
| 25 | 25 | - run: zig env |
README.md+1-1| ... | ... | @@ -16,7 +16,7 @@ A package manager for the Zig programming language. |
| 16 | 16 | - https://github.com/nektro/zigmod/releases |
| 17 | 17 | |
| 18 | 18 | ## Built With |
| 19 | - Zig master (at least `0.11.0-dev.3620+c76ce25a6`) | |
| 19 | - Zig master (at least `0.11.0`) | |
| 20 | 20 | - See [`zig.mod`](./zig.mod) and [`zigmod.lock`](./zigmod.lock) |
| 21 | 21 | |
| 22 | 22 | ### Build from Source |
deps.zig+31-37| ... | ... | @@ -55,23 +55,22 @@ pub fn fetch(exe: *std.build.LibExeObjStep) void { |
| 55 | 55 | const root = if (@field(package_data, decl.name).store) |_| b.cache_root.path.? else "."; |
| 56 | 56 | if (path.* != null) path.* = b.fmt("{s}/zigmod/deps{s}", .{ root, path.*.? }); |
| 57 | 57 | } |
| 58 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/MasterQ32/zig-uri", "d4299ad6043ad19f2ce0676687b0bff57273eae2").step); | |
| 59 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/marlersoft/zigwin32", "b70e7f818d77a0c0f39b0bd9c549e16439ff5780").step); | |
| 60 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/arqv-ini", "ee395fd34e152d9067def609d86b7af5382b83b1").step); | |
| 61 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/iguanaTLS", "e70995575b397f33d798339d4f1656bcdf0ab82f").step); | |
| 62 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-ansi", "faf9585bfe5980c24748ee8a3e6a22faaa50b437").step); | |
| 58 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/marlersoft/zigwin32", "007649ade45ffb544de3aafbb112de25064d3d92").step); | |
| 59 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/arqv-ini", "ddbe89bb0d9085e939bcbc713caeb2b7cf852bae").step); | |
| 60 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/iguanaTLS", "c932f557865abaa1d06cd88e9b22a9f3e583fa59").step); | |
| 61 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zfetch", "f51277414a2309f776fb79f3d55f26e37f9a54da").step); | |
| 62 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-ansi", "ac607e4e7ac36d46cc67c8786262578330543a36").step); | |
| 63 | 63 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-detect-license", "8f13721bd18c0e546841b6f2e11da839550d6287").step); |
| 64 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-extras", "ff267312e8d714c9b9d8c44ad3291f6e509dc12f").step); | |
| 64 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-extras", "54abdc5bce0b243601ef4808bce1c29e1a46cdec").step); | |
| 65 | 65 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-inquirer", "5cc2a5565d04fe2c0085f0d6818590e800d9dcf7").step); |
| 66 | 66 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-leven", "550cabd5a18ace5e67761bc5b867c10e926f4314").step); |
| 67 | 67 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses", "c9b8cbf3565675a056ad4e9b57cb4f84020e7680").step); |
| 68 | 68 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses-text", "3c07c6e4eb0965dafd0b029c632f823631b3169c").step); |
| 69 | 69 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-range", "4b2f12808aa09be4b27a163efc424dd4e0415992").step); |
| 70 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-time", "ca9c0e6b644d74c1d549cc2c1ee22113aa021bd8").step); | |
| 71 | 70 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-yaml", "e56b9fed6c0afd1c4d29bedc08c3899ffe1165e9").step); |
| 72 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/truemedian/hzzp", "501386e13b2f7849128f3b271d23de6127b1d9d7").step); | |
| 73 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/truemedian/zfetch", "829973144f680cd16be16923041fa810c1dee417").step); | |
| 74 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/ziglibs/known-folders", "d13ba6137084e55f873f6afb67447fe8906cc951").step); | |
| 71 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-time", "12fad367a5282827aad7e12f0e9cd36f672c4010").step); | |
| 72 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/truemedian/hzzp", "305aca97fce78eb3e787d57691a5eed5512bece7").step); | |
| 73 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/ziglibs/known-folders", "fa75e1bc672952efa0cf06160bbd942b47f6d59b").step); | |
| 75 | 74 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/yaml/libyaml", "2c891fc7a770e8ba2fec34fc6b545c672beb37e6").step); |
| 76 | 75 | } |
| 77 | 76 | |
| ... | ... | @@ -111,11 +110,11 @@ pub fn addAllTo(exe: *std.build.LibExeObjStep) void { |
| 111 | 110 | llc = true; |
| 112 | 111 | } |
| 113 | 112 | for (pkg.c_include_dirs) |item| { |
| 114 | exe.addIncludePath(b.fmt("{s}/{s}", .{ root, item })); | |
| 113 | exe.addIncludePath(.{.path = b.fmt("{s}/{s}", .{ root, item })}); | |
| 115 | 114 | llc = true; |
| 116 | 115 | } |
| 117 | 116 | for (pkg.c_source_files) |item| { |
| 118 | exe.addCSourceFile(b.fmt("{s}/{s}", .{ root, item }), pkg.c_source_flags); | |
| 117 | exe.addCSourceFile(.{ .file = .{ .path = b.fmt("{s}/{s}", .{ root, item }) }, .flags = pkg.c_source_flags }); | |
| 119 | 118 | llc = true; |
| 120 | 119 | } |
| 121 | 120 | vcpkg = vcpkg or pkg.vcpkg; |
| ... | ... | @@ -158,40 +157,35 @@ pub const Package = struct { |
| 158 | 157 | }; |
| 159 | 158 | |
| 160 | 159 | fn checkMinZig(current: std.SemanticVersion, exe: *std.build.LibExeObjStep) void { |
| 161 | const min = std.SemanticVersion.parse("0.11.0-dev.3620+c76ce25a6") catch return; | |
| 160 | const min = std.SemanticVersion.parse("0.11.0") catch return; | |
| 162 | 161 | 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})); |
| 163 | 162 | } |
| 164 | 163 | |
| 165 | 164 | pub const package_data = struct { |
| 166 | pub var _u9w9dpp6p804 = Package{ | |
| 167 | .store = "/git/github.com/MasterQ32/zig-uri/d4299ad6043ad19f2ce0676687b0bff57273eae2", | |
| 168 | .name = "uri", | |
| 169 | .entry = "/git/github.com/MasterQ32/zig-uri/d4299ad6043ad19f2ce0676687b0bff57273eae2/uri.zig", | |
| 170 | }; | |
| 171 | 165 | pub var _o6ogpor87xc2 = Package{ |
| 172 | .store = "/git/github.com/marlersoft/zigwin32/b70e7f818d77a0c0f39b0bd9c549e16439ff5780", | |
| 166 | .store = "/git/github.com/marlersoft/zigwin32/007649ade45ffb544de3aafbb112de25064d3d92", | |
| 173 | 167 | .name = "win32", |
| 174 | .entry = "/git/github.com/marlersoft/zigwin32/b70e7f818d77a0c0f39b0bd9c549e16439ff5780/win32.zig", | |
| 168 | .entry = "/git/github.com/marlersoft/zigwin32/007649ade45ffb544de3aafbb112de25064d3d92/win32.zig", | |
| 175 | 169 | }; |
| 176 | 170 | pub var _u7sysdckdymi = Package{ |
| 177 | .store = "/git/github.com/nektro/arqv-ini/ee395fd34e152d9067def609d86b7af5382b83b1", | |
| 171 | .store = "/git/github.com/nektro/arqv-ini/ddbe89bb0d9085e939bcbc713caeb2b7cf852bae", | |
| 178 | 172 | .name = "ini", |
| 179 | .entry = "/git/github.com/nektro/arqv-ini/ee395fd34e152d9067def609d86b7af5382b83b1/src/ini.zig", | |
| 173 | .entry = "/git/github.com/nektro/arqv-ini/ddbe89bb0d9085e939bcbc713caeb2b7cf852bae/src/ini.zig", | |
| 180 | 174 | }; |
| 181 | 175 | pub var _csbnipaad8n7 = Package{ |
| 182 | .store = "/git/github.com/nektro/iguanaTLS/e70995575b397f33d798339d4f1656bcdf0ab82f", | |
| 176 | .store = "/git/github.com/nektro/iguanaTLS/c932f557865abaa1d06cd88e9b22a9f3e583fa59", | |
| 183 | 177 | .name = "iguanaTLS", |
| 184 | .entry = "/git/github.com/nektro/iguanaTLS/e70995575b397f33d798339d4f1656bcdf0ab82f/src/main.zig", | |
| 178 | .entry = "/git/github.com/nektro/iguanaTLS/c932f557865abaa1d06cd88e9b22a9f3e583fa59/src/main.zig", | |
| 185 | 179 | }; |
| 186 | 180 | pub var _s84v9o48ucb0 = Package{ |
| 187 | .store = "/git/github.com/nektro/zig-ansi/faf9585bfe5980c24748ee8a3e6a22faaa50b437", | |
| 181 | .store = "/git/github.com/nektro/zig-ansi/ac607e4e7ac36d46cc67c8786262578330543a36", | |
| 188 | 182 | .name = "ansi", |
| 189 | .entry = "/git/github.com/nektro/zig-ansi/faf9585bfe5980c24748ee8a3e6a22faaa50b437/src/lib.zig", | |
| 183 | .entry = "/git/github.com/nektro/zig-ansi/ac607e4e7ac36d46cc67c8786262578330543a36/src/lib.zig", | |
| 190 | 184 | }; |
| 191 | 185 | pub var _f7dubzb7cyqe = Package{ |
| 192 | .store = "/git/github.com/nektro/zig-extras/ff267312e8d714c9b9d8c44ad3291f6e509dc12f", | |
| 186 | .store = "/git/github.com/nektro/zig-extras/54abdc5bce0b243601ef4808bce1c29e1a46cdec", | |
| 193 | 187 | .name = "extras", |
| 194 | .entry = "/git/github.com/nektro/zig-extras/ff267312e8d714c9b9d8c44ad3291f6e509dc12f/src/lib.zig", | |
| 188 | .entry = "/git/github.com/nektro/zig-extras/54abdc5bce0b243601ef4808bce1c29e1a46cdec/src/lib.zig", | |
| 195 | 189 | }; |
| 196 | 190 | pub var _0npcrzfdlrvk = Package{ |
| 197 | 191 | .store = "/git/github.com/nektro/zig-licenses/c9b8cbf3565675a056ad4e9b57cb4f84020e7680", |
| ... | ... | @@ -227,9 +221,9 @@ pub const package_data = struct { |
| 227 | 221 | .deps = &[_]*Package{ &_pt88y5d80m25, &_96h80ezrvj7i }, |
| 228 | 222 | }; |
| 229 | 223 | pub var _iecwp4b3bsfm = Package{ |
| 230 | .store = "/git/github.com/nektro/zig-time/ca9c0e6b644d74c1d549cc2c1ee22113aa021bd8", | |
| 224 | .store = "/git/github.com/nektro/zig-time/12fad367a5282827aad7e12f0e9cd36f672c4010", | |
| 231 | 225 | .name = "time", |
| 232 | .entry = "/git/github.com/nektro/zig-time/ca9c0e6b644d74c1d549cc2c1ee22113aa021bd8/time.zig", | |
| 226 | .entry = "/git/github.com/nektro/zig-time/12fad367a5282827aad7e12f0e9cd36f672c4010/time.zig", | |
| 233 | 227 | .deps = &[_]*Package{ &_f7dubzb7cyqe }, |
| 234 | 228 | }; |
| 235 | 229 | pub var _g982zq6e8wsv = Package{ |
| ... | ... | @@ -239,20 +233,20 @@ pub const package_data = struct { |
| 239 | 233 | .deps = &[_]*Package{ &_f7dubzb7cyqe }, |
| 240 | 234 | }; |
| 241 | 235 | pub var _9k24gimke1an = Package{ |
| 242 | .store = "/git/github.com/truemedian/hzzp/501386e13b2f7849128f3b271d23de6127b1d9d7", | |
| 236 | .store = "/git/github.com/truemedian/hzzp/305aca97fce78eb3e787d57691a5eed5512bece7", | |
| 243 | 237 | .name = "hzzp", |
| 244 | .entry = "/git/github.com/truemedian/hzzp/501386e13b2f7849128f3b271d23de6127b1d9d7/src/main.zig", | |
| 238 | .entry = "/git/github.com/truemedian/hzzp/305aca97fce78eb3e787d57691a5eed5512bece7/src/main.zig", | |
| 245 | 239 | }; |
| 246 | 240 | pub var _ejw82j2ipa0e = Package{ |
| 247 | .store = "/git/github.com/truemedian/zfetch/829973144f680cd16be16923041fa810c1dee417", | |
| 241 | .store = "/git/github.com/nektro/zfetch/f51277414a2309f776fb79f3d55f26e37f9a54da", | |
| 248 | 242 | .name = "zfetch", |
| 249 | .entry = "/git/github.com/truemedian/zfetch/829973144f680cd16be16923041fa810c1dee417/src/main.zig", | |
| 250 | .deps = &[_]*Package{ &_9k24gimke1an, &_csbnipaad8n7, &_u9w9dpp6p804 }, | |
| 243 | .entry = "/git/github.com/nektro/zfetch/f51277414a2309f776fb79f3d55f26e37f9a54da/src/main.zig", | |
| 244 | .deps = &[_]*Package{ &_9k24gimke1an, &_csbnipaad8n7 }, | |
| 251 | 245 | }; |
| 252 | 246 | pub var _2ta738wrqbaq = Package{ |
| 253 | .store = "/git/github.com/ziglibs/known-folders/d13ba6137084e55f873f6afb67447fe8906cc951", | |
| 247 | .store = "/git/github.com/ziglibs/known-folders/fa75e1bc672952efa0cf06160bbd942b47f6d59b", | |
| 254 | 248 | .name = "known-folders", |
| 255 | .entry = "/git/github.com/ziglibs/known-folders/d13ba6137084e55f873f6afb67447fe8906cc951/known-folders.zig", | |
| 249 | .entry = "/git/github.com/ziglibs/known-folders/fa75e1bc672952efa0cf06160bbd942b47f6d59b/known-folders.zig", | |
| 256 | 250 | }; |
| 257 | 251 | pub var _89ujp8gq842x = Package{ |
| 258 | 252 | .name = "zigmod", |
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.11.0-dev.3620+c76ce25a6`. | |
| 13 | The earliest Zig release this Zigmod was verified to work with is `0.11.0`. | |
| 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. |
licenses.txt+1-2| ... | ... | @@ -1,10 +1,10 @@ |
| 1 | 1 | MIT: |
| 2 | 2 | = https://spdx.org/licenses/MIT |
| 3 | 3 | - This |
| 4 | - git https://github.com/MasterQ32/zig-uri | |
| 5 | 4 | - git https://github.com/marlersoft/zigwin32 |
| 6 | 5 | - git https://github.com/nektro/arqv-ini |
| 7 | 6 | - git https://github.com/nektro/iguanaTLS |
| 7 | - git https://github.com/nektro/zfetch | |
| 8 | 8 | - git https://github.com/nektro/zig-ansi |
| 9 | 9 | - git https://github.com/nektro/zig-detect-license |
| 10 | 10 | - git https://github.com/nektro/zig-extras |
| ... | ... | @@ -16,6 +16,5 @@ MIT: |
| 16 | 16 | - git https://github.com/nektro/zig-time |
| 17 | 17 | - git https://github.com/nektro/zig-yaml |
| 18 | 18 | - git https://github.com/truemedian/hzzp |
| 19 | - git https://github.com/truemedian/zfetch | |
| 20 | 19 | - git https://github.com/ziglibs/known-folders |
| 21 | 20 | - git https://github.com/yaml/libyaml |
src/cmd/aq.zig+2-2| ... | ... | @@ -43,7 +43,7 @@ pub fn execute(args: [][]u8) !void { |
| 43 | 43 | u.fail("unknown command \"{s}\" for \"zigmod aq\"", .{args[0]}); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | pub fn server_fetch(url: string) !std.json.ValueTree { | |
| 46 | pub fn server_fetch(url: string) !std.json.Parsed(std.json.Value) { | |
| 47 | 47 | const req = try zfetch.Request.init(gpa, url, null); |
| 48 | 48 | defer req.deinit(); |
| 49 | 49 | |
| ... | ... | @@ -57,7 +57,7 @@ pub fn server_fetch(url: string) !std.json.ValueTree { |
| 57 | 57 | const body_content = try r.readAllAlloc(gpa, std.math.maxInt(usize)); |
| 58 | 58 | const val = try extras.parse_json(gpa, body_content); |
| 59 | 59 | |
| 60 | if (val.root.object.get("message")) |msg| { | |
| 60 | if (val.value.object.get("message")) |msg| { | |
| 61 | 61 | std.log.err("server: {s}", .{msg.string}); |
| 62 | 62 | return error.AquilaBadResponse; |
| 63 | 63 | } |
src/cmd/aquila/add.zig+2-2| ... | ... | @@ -19,8 +19,8 @@ pub fn do(dir: std.fs.Dir, pkg_id: string) !string { |
| 19 | 19 | const val = try aq.server_fetch(url); |
| 20 | 20 | |
| 21 | 21 | const pkg_url = try std.fmt.allocPrint(gpa, "https://{s}/{s}", .{ |
| 22 | val.root.object.get("repo").?.object.get("domain").?.string, | |
| 23 | val.root.object.get("package").?.object.get("remote_name").?.string, | |
| 22 | val.value.object.get("repo").?.object.get("domain").?.string, | |
| 23 | val.value.object.get("package").?.object.get("remote_name").?.string, | |
| 24 | 24 | }); |
| 25 | 25 | |
| 26 | 26 | const m = try zigmod.ModFile.from_dir(gpa, dir); |
src/cmd/fetch.zig+2-2| ... | ... | @@ -77,11 +77,11 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D |
| 77 | 77 | \\ llc = true; |
| 78 | 78 | \\ } |
| 79 | 79 | \\ for (pkg.c_include_dirs) |item| { |
| 80 | \\ exe.addIncludePath(b.fmt("{s}/{s}", .{ @field(dirs, decl.name), item })); | |
| 80 | \\ exe.addIncludePath(.{.path = b.fmt("{s}/{s}", .{ @field(dirs, decl.name), item })}); | |
| 81 | 81 | \\ llc = true; |
| 82 | 82 | \\ } |
| 83 | 83 | \\ for (pkg.c_source_files) |item| { |
| 84 | \\ exe.addCSourceFile(b.fmt("{s}/{s}", .{ @field(dirs, decl.name), item }), pkg.c_source_flags); | |
| 84 | \\ exe.addCSourceFile(.{ .file = .{ .path = b.fmt("{s}/{s}", .{ @field(dirs, decl.name), item }) }, .flags = pkg.c_source_flags }); | |
| 85 | 85 | \\ llc = true; |
| 86 | 86 | \\ } |
| 87 | 87 | \\ vcpkg = vcpkg or pkg.vcpkg; |
src/cmd/generate.zig+2-2| ... | ... | @@ -147,11 +147,11 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D |
| 147 | 147 | \\ llc = true; |
| 148 | 148 | \\ } |
| 149 | 149 | \\ for (pkg.c_include_dirs) |item| { |
| 150 | \\ exe.addIncludePath(b.fmt("{s}/{s}", .{ root, item })); | |
| 150 | \\ exe.addIncludePath(.{.path = b.fmt("{s}/{s}", .{ root, item })}); | |
| 151 | 151 | \\ llc = true; |
| 152 | 152 | \\ } |
| 153 | 153 | \\ for (pkg.c_source_files) |item| { |
| 154 | \\ exe.addCSourceFile(b.fmt("{s}/{s}", .{ root, item }), pkg.c_source_flags); | |
| 154 | \\ exe.addCSourceFile(.{ .file = .{ .path = b.fmt("{s}/{s}", .{ root, item }) }, .flags = pkg.c_source_flags }); | |
| 155 | 155 | \\ llc = true; |
| 156 | 156 | \\ } |
| 157 | 157 | \\ vcpkg = vcpkg or pkg.vcpkg; |
src/cmd/init.zig+1-1| ... | ... | @@ -118,7 +118,7 @@ pub fn execute(args: [][]u8) !void { |
| 118 | 118 | if (run >= 79) { |
| 119 | 119 | const s_ind = (std.mem.lastIndexOfScalar(u8, realtext[start..end], ' ') orelse end) + start; |
| 120 | 120 | const n_ind = (std.mem.lastIndexOfScalar(u8, realtext[start .. end - 1], '\n') orelse end) + start; |
| 121 | const ind = std.math.min(s_ind, n_ind); | |
| 121 | const ind = @min(s_ind, n_ind); | |
| 122 | 122 | try w.print("{s}\n", .{realtext[start..ind]}); |
| 123 | 123 | end = ind + 1; |
| 124 | 124 | start = end; |
src/cmd/zpm.zig+3-3| ... | ... | @@ -55,7 +55,7 @@ pub fn execute(args: [][]u8) !void { |
| 55 | 55 | u.fail("unknown command \"{s}\" for \"zigmod zpm\"", .{args[0]}); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | pub fn server_fetch(url: string) !std.json.ValueTree { | |
| 58 | pub fn server_fetch(url: string) !std.json.Parsed(std.json.Value) { | |
| 59 | 59 | const req = try zfetch.Request.init(gpa, url, null); |
| 60 | 60 | defer req.deinit(); |
| 61 | 61 | try req.do(.GET, null, null); |
| ... | ... | @@ -69,7 +69,7 @@ pub fn server_fetchArray(url: string) ![]const Package { |
| 69 | 69 | var list = std.ArrayList(Package).init(gpa); |
| 70 | 70 | errdefer list.deinit(); |
| 71 | 71 | |
| 72 | for (val.root.array.items) |item| { | |
| 72 | for (val.value.array.items) |item| { | |
| 73 | 73 | if (get(item, "root_file") == null) continue; |
| 74 | 74 | try list.append(Package{ |
| 75 | 75 | .name = item.object.get("name").?.string, |
| ... | ... | @@ -78,7 +78,7 @@ pub fn server_fetchArray(url: string) ![]const Package { |
| 78 | 78 | .tags = try valueStrArray(item.object.get("tags").?.array.items), |
| 79 | 79 | .git = item.object.get("git").?.string, |
| 80 | 80 | .root_file = item.object.get("root_file").?.string, |
| 81 | .source = @intCast(u32, item.object.get("source").?.integer), | |
| 81 | .source = @intCast(item.object.get("source").?.integer), | |
| 82 | 82 | .links = try valueLinks(item.object.get("links").?), |
| 83 | 83 | }); |
| 84 | 84 | } |
src/cmd/zpm/add.zig+2-2| ... | ... | @@ -44,14 +44,14 @@ pub fn execute(args: [][]u8) !void { |
| 44 | 44 | const _req = try zfetch.Request.init(gpa, _url, null); |
| 45 | 45 | defer _req.deinit(); |
| 46 | 46 | try _req.do(.GET, null, null); |
| 47 | break :blk _req.status.code == 200; | |
| 47 | break :blk @intFromEnum(_req.status) == 200; | |
| 48 | 48 | }; |
| 49 | 49 | const has_zigmodyml = blk: { |
| 50 | 50 | const _url = try std.mem.join(gpa, "/", &.{ found.git, "blob", "HEAD", "zigmod.yml" }); |
| 51 | 51 | const _req = try zfetch.Request.init(gpa, _url, null); |
| 52 | 52 | defer _req.deinit(); |
| 53 | 53 | try _req.do(.GET, null, null); |
| 54 | break :blk _req.status.code == 200; | |
| 54 | break :blk @intFromEnum(_req.status) == 200; | |
| 55 | 55 | }; |
| 56 | 56 | |
| 57 | 57 | const file = try zigmod.ModFile.openFile(std.fs.cwd(), .{ .mode = .read_write }); |
src/cmd/zpm/tags.zig+2-2| ... | ... | @@ -17,7 +17,7 @@ pub fn execute(args: [][]u8) !void { |
| 17 | 17 | |
| 18 | 18 | const name_col_width = blk: { |
| 19 | 19 | var w: usize = 4; |
| 20 | for (val.root.array.items) |tag| { | |
| 20 | for (val.value.array.items) |tag| { | |
| 21 | 21 | const len = tag.object.get("name").?.string.len; |
| 22 | 22 | if (len > w) { |
| 23 | 23 | w = len; |
| ... | ... | @@ -30,7 +30,7 @@ pub fn execute(args: [][]u8) !void { |
| 30 | 30 | try print_c_n(out, ' ', name_col_width - 4); |
| 31 | 31 | try out.writeAll("DESCRIPTION\n"); |
| 32 | 32 | |
| 33 | for (val.root.array.items) |tag| { | |
| 33 | for (val.value.array.items) |tag| { | |
| 34 | 34 | const name = tag.object.get("name").?.string; |
| 35 | 35 | try out.writeAll(name); |
| 36 | 36 | try print_c_n(out, ' ', name_col_width - name.len); |
src/util/funcs.zig+3-3| ... | ... | @@ -118,7 +118,7 @@ pub fn last(in: []string) !string { |
| 118 | 118 | const alphabet = "0123456789abcdefghijklmnopqrstuvwxyz"; |
| 119 | 119 | |
| 120 | 120 | pub fn random_string(alloc: std.mem.Allocator, len: usize) !string { |
| 121 | const now = @intCast(u64, std.time.nanoTimestamp()); | |
| 121 | const now: u64 = @intCast(std.time.nanoTimestamp()); | |
| 122 | 122 | var rand = std.rand.DefaultPrng.init(now); |
| 123 | 123 | var r = rand.random(); |
| 124 | 124 | var buf = try alloc.alloc(u8, len); |
| ... | ... | @@ -191,8 +191,8 @@ pub fn git_rev_HEAD(alloc: std.mem.Allocator, dir: std.fs.Dir) !string { |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | pub fn slice(comptime T: type, input: []const T, from: usize, to: usize) []const T { |
| 194 | const f = std.math.max(from, 0); | |
| 195 | const t = std.math.min(to, input.len); | |
| 194 | const f = @max(from, 0); | |
| 195 | const t = @min(to, input.len); | |
| 196 | 196 | return input[f..t]; |
| 197 | 197 | } |
| 198 | 198 |
zig.mod+2-2| ... | ... | @@ -3,13 +3,13 @@ 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.11.0-dev.3620+c76ce25a6 | |
| 6 | min_zig_version: 0.11.0 | |
| 7 | 7 | dependencies: |
| 8 | 8 | - src: git https://github.com/nektro/zig-yaml |
| 9 | 9 | - src: git https://github.com/nektro/zig-ansi |
| 10 | 10 | - src: git https://github.com/ziglibs/known-folders |
| 11 | 11 | - src: git https://github.com/nektro/zig-licenses |
| 12 | - src: git https://github.com/truemedian/zfetch | |
| 12 | - src: git https://github.com/nektro/zfetch | |
| 13 | 13 | - src: git https://github.com/nektro/zig-detect-license |
| 14 | 14 | - src: git https://github.com/nektro/zig-inquirer |
| 15 | 15 | - src: git https://github.com/nektro/arqv-ini |
zigmod.lock+9-10| ... | ... | @@ -1,19 +1,18 @@ |
| 1 | 1 | 2 |
| 2 | git https://github.com/MasterQ32/zig-uri commit-d4299ad6043ad19f2ce0676687b0bff57273eae2 | |
| 3 | git https://github.com/marlersoft/zigwin32 commit-b70e7f818d77a0c0f39b0bd9c549e16439ff5780 | |
| 4 | git https://github.com/nektro/arqv-ini commit-ee395fd34e152d9067def609d86b7af5382b83b1 | |
| 5 | git https://github.com/nektro/iguanaTLS commit-e70995575b397f33d798339d4f1656bcdf0ab82f | |
| 6 | git https://github.com/nektro/zig-ansi commit-faf9585bfe5980c24748ee8a3e6a22faaa50b437 | |
| 2 | git https://github.com/marlersoft/zigwin32 commit-007649ade45ffb544de3aafbb112de25064d3d92 | |
| 3 | git https://github.com/nektro/arqv-ini commit-ddbe89bb0d9085e939bcbc713caeb2b7cf852bae | |
| 4 | git https://github.com/nektro/iguanaTLS commit-c932f557865abaa1d06cd88e9b22a9f3e583fa59 | |
| 5 | git https://github.com/nektro/zfetch commit-f51277414a2309f776fb79f3d55f26e37f9a54da | |
| 6 | git https://github.com/nektro/zig-ansi commit-ac607e4e7ac36d46cc67c8786262578330543a36 | |
| 7 | 7 | git https://github.com/nektro/zig-detect-license commit-8f13721bd18c0e546841b6f2e11da839550d6287 |
| 8 | git https://github.com/nektro/zig-extras commit-ff267312e8d714c9b9d8c44ad3291f6e509dc12f | |
| 8 | git https://github.com/nektro/zig-extras commit-54abdc5bce0b243601ef4808bce1c29e1a46cdec | |
| 9 | 9 | git https://github.com/nektro/zig-inquirer commit-5cc2a5565d04fe2c0085f0d6818590e800d9dcf7 |
| 10 | 10 | git https://github.com/nektro/zig-leven commit-550cabd5a18ace5e67761bc5b867c10e926f4314 |
| 11 | 11 | git https://github.com/nektro/zig-licenses commit-c9b8cbf3565675a056ad4e9b57cb4f84020e7680 |
| 12 | 12 | git https://github.com/nektro/zig-licenses-text commit-3c07c6e4eb0965dafd0b029c632f823631b3169c |
| 13 | 13 | git https://github.com/nektro/zig-range commit-4b2f12808aa09be4b27a163efc424dd4e0415992 |
| 14 | git https://github.com/nektro/zig-time commit-ca9c0e6b644d74c1d549cc2c1ee22113aa021bd8 | |
| 14 | git https://github.com/nektro/zig-time commit-12fad367a5282827aad7e12f0e9cd36f672c4010 | |
| 15 | 15 | git https://github.com/nektro/zig-yaml commit-e56b9fed6c0afd1c4d29bedc08c3899ffe1165e9 |
| 16 | git https://github.com/truemedian/hzzp commit-501386e13b2f7849128f3b271d23de6127b1d9d7 | |
| 17 | git https://github.com/truemedian/zfetch commit-829973144f680cd16be16923041fa810c1dee417 | |
| 18 | git https://github.com/ziglibs/known-folders commit-d13ba6137084e55f873f6afb67447fe8906cc951 | |
| 16 | git https://github.com/truemedian/hzzp commit-305aca97fce78eb3e787d57691a5eed5512bece7 | |
| 17 | git https://github.com/ziglibs/known-folders commit-fa75e1bc672952efa0cf06160bbd942b47f6d59b | |
| 19 | 18 | git https://github.com/yaml/libyaml tag-0.2.5 |