authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-08-10 01:28:28 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-08-10 01:28:28 -07:00
log50ccfe3d1d84b4f27a4bb66fd4321623663a0163
treeea506efe4f98adc203eccd6a583d1c8544cd3c6f
parent21b73b05d10bc8aaf98724c0970be67249c5a0bf

update to Zig 0.11.0


17 files changed, 66 insertions(+), 74 deletions(-)

.github/workflows/nightly.yml+1-1
......@@ -26,7 +26,7 @@ jobs:
2626 - name: Setup Zig
2727 uses: goto-bus-stop/setup-zig@v2
2828 with:
29 version: "0.11.0-dev.3652+f5043ad6a"
29 version: "0.11.0"
3030
3131 - run: zig version
3232 - run: zig env
.github/workflows/push.yml+1-1
......@@ -19,7 +19,7 @@ jobs:
1919 - name: Setup Zig
2020 uses: goto-bus-stop/setup-zig@v2
2121 with:
22 version: "0.11.0-dev.3652+f5043ad6a"
22 version: "0.11.0"
2323
2424 - run: zig version
2525 - run: zig env
README.md+1-1
......@@ -16,7 +16,7 @@ A package manager for the Zig programming language.
1616- https://github.com/nektro/zigmod/releases
1717
1818## Built With
19- Zig master (at least `0.11.0-dev.3620+c76ce25a6`)
19- Zig master (at least `0.11.0`)
2020- See [`zig.mod`](./zig.mod) and [`zigmod.lock`](./zigmod.lock)
2121
2222### Build from Source
deps.zig+31-37
......@@ -55,23 +55,22 @@ pub fn fetch(exe: *std.build.LibExeObjStep) void {
5555 const root = if (@field(package_data, decl.name).store) |_| b.cache_root.path.? else ".";
5656 if (path.* != null) path.* = b.fmt("{s}/zigmod/deps{s}", .{ root, path.*.? });
5757 }
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);
6363 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);
6565 exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-inquirer", "5cc2a5565d04fe2c0085f0d6818590e800d9dcf7").step);
6666 exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-leven", "550cabd5a18ace5e67761bc5b867c10e926f4314").step);
6767 exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses", "c9b8cbf3565675a056ad4e9b57cb4f84020e7680").step);
6868 exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses-text", "3c07c6e4eb0965dafd0b029c632f823631b3169c").step);
6969 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);
7170 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);
7574 exe.step.dependOn(&GitExactStep.create(b, "https://github.com/yaml/libyaml", "2c891fc7a770e8ba2fec34fc6b545c672beb37e6").step);
7675}
7776
......@@ -111,11 +110,11 @@ pub fn addAllTo(exe: *std.build.LibExeObjStep) void {
111110 llc = true;
112111 }
113112 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 })});
115114 llc = true;
116115 }
117116 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 });
119118 llc = true;
120119 }
121120 vcpkg = vcpkg or pkg.vcpkg;
......@@ -158,40 +157,35 @@ pub const Package = struct {
158157};
159158
160159fn 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;
162161 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}));
163162}
164163
165164pub 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 };
171165 pub var _o6ogpor87xc2 = Package{
172 .store = "/git/github.com/marlersoft/zigwin32/b70e7f818d77a0c0f39b0bd9c549e16439ff5780",
166 .store = "/git/github.com/marlersoft/zigwin32/007649ade45ffb544de3aafbb112de25064d3d92",
173167 .name = "win32",
174 .entry = "/git/github.com/marlersoft/zigwin32/b70e7f818d77a0c0f39b0bd9c549e16439ff5780/win32.zig",
168 .entry = "/git/github.com/marlersoft/zigwin32/007649ade45ffb544de3aafbb112de25064d3d92/win32.zig",
175169 };
176170 pub var _u7sysdckdymi = Package{
177 .store = "/git/github.com/nektro/arqv-ini/ee395fd34e152d9067def609d86b7af5382b83b1",
171 .store = "/git/github.com/nektro/arqv-ini/ddbe89bb0d9085e939bcbc713caeb2b7cf852bae",
178172 .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",
180174 };
181175 pub var _csbnipaad8n7 = Package{
182 .store = "/git/github.com/nektro/iguanaTLS/e70995575b397f33d798339d4f1656bcdf0ab82f",
176 .store = "/git/github.com/nektro/iguanaTLS/c932f557865abaa1d06cd88e9b22a9f3e583fa59",
183177 .name = "iguanaTLS",
184 .entry = "/git/github.com/nektro/iguanaTLS/e70995575b397f33d798339d4f1656bcdf0ab82f/src/main.zig",
178 .entry = "/git/github.com/nektro/iguanaTLS/c932f557865abaa1d06cd88e9b22a9f3e583fa59/src/main.zig",
185179 };
186180 pub var _s84v9o48ucb0 = Package{
187 .store = "/git/github.com/nektro/zig-ansi/faf9585bfe5980c24748ee8a3e6a22faaa50b437",
181 .store = "/git/github.com/nektro/zig-ansi/ac607e4e7ac36d46cc67c8786262578330543a36",
188182 .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",
190184 };
191185 pub var _f7dubzb7cyqe = Package{
192 .store = "/git/github.com/nektro/zig-extras/ff267312e8d714c9b9d8c44ad3291f6e509dc12f",
186 .store = "/git/github.com/nektro/zig-extras/54abdc5bce0b243601ef4808bce1c29e1a46cdec",
193187 .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",
195189 };
196190 pub var _0npcrzfdlrvk = Package{
197191 .store = "/git/github.com/nektro/zig-licenses/c9b8cbf3565675a056ad4e9b57cb4f84020e7680",
......@@ -227,9 +221,9 @@ pub const package_data = struct {
227221 .deps = &[_]*Package{ &_pt88y5d80m25, &_96h80ezrvj7i },
228222 };
229223 pub var _iecwp4b3bsfm = Package{
230 .store = "/git/github.com/nektro/zig-time/ca9c0e6b644d74c1d549cc2c1ee22113aa021bd8",
224 .store = "/git/github.com/nektro/zig-time/12fad367a5282827aad7e12f0e9cd36f672c4010",
231225 .name = "time",
232 .entry = "/git/github.com/nektro/zig-time/ca9c0e6b644d74c1d549cc2c1ee22113aa021bd8/time.zig",
226 .entry = "/git/github.com/nektro/zig-time/12fad367a5282827aad7e12f0e9cd36f672c4010/time.zig",
233227 .deps = &[_]*Package{ &_f7dubzb7cyqe },
234228 };
235229 pub var _g982zq6e8wsv = Package{
......@@ -239,20 +233,20 @@ pub const package_data = struct {
239233 .deps = &[_]*Package{ &_f7dubzb7cyqe },
240234 };
241235 pub var _9k24gimke1an = Package{
242 .store = "/git/github.com/truemedian/hzzp/501386e13b2f7849128f3b271d23de6127b1d9d7",
236 .store = "/git/github.com/truemedian/hzzp/305aca97fce78eb3e787d57691a5eed5512bece7",
243237 .name = "hzzp",
244 .entry = "/git/github.com/truemedian/hzzp/501386e13b2f7849128f3b271d23de6127b1d9d7/src/main.zig",
238 .entry = "/git/github.com/truemedian/hzzp/305aca97fce78eb3e787d57691a5eed5512bece7/src/main.zig",
245239 };
246240 pub var _ejw82j2ipa0e = Package{
247 .store = "/git/github.com/truemedian/zfetch/829973144f680cd16be16923041fa810c1dee417",
241 .store = "/git/github.com/nektro/zfetch/f51277414a2309f776fb79f3d55f26e37f9a54da",
248242 .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 },
251245 };
252246 pub var _2ta738wrqbaq = Package{
253 .store = "/git/github.com/ziglibs/known-folders/d13ba6137084e55f873f6afb67447fe8906cc951",
247 .store = "/git/github.com/ziglibs/known-folders/fa75e1bc672952efa0cf06160bbd942b47f6d59b",
254248 .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",
256250 };
257251 pub var _89ujp8gq842x = Package{
258252 .name = "zigmod",
docs/README.md+1-1
......@@ -10,7 +10,7 @@ The rest of this documentation will assume you already have Zig installed.
1010
1111As Zig is still in development itself, if you plan to contribute to Zigmod you will need a master download of Zig. Those can be obtained from https://ziglang.org/download/#release-master.
1212
13The earliest Zig release this Zigmod was verified to work with is `0.11.0-dev.3620+c76ce25a6`.
13The earliest Zig release this Zigmod was verified to work with is `0.11.0`.
1414
1515## Download
1616You 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 @@
11MIT:
22= https://spdx.org/licenses/MIT
33- This
4- git https://github.com/MasterQ32/zig-uri
54- git https://github.com/marlersoft/zigwin32
65- git https://github.com/nektro/arqv-ini
76- git https://github.com/nektro/iguanaTLS
7- git https://github.com/nektro/zfetch
88- git https://github.com/nektro/zig-ansi
99- git https://github.com/nektro/zig-detect-license
1010- git https://github.com/nektro/zig-extras
......@@ -16,6 +16,5 @@ MIT:
1616- git https://github.com/nektro/zig-time
1717- git https://github.com/nektro/zig-yaml
1818- git https://github.com/truemedian/hzzp
19- git https://github.com/truemedian/zfetch
2019- git https://github.com/ziglibs/known-folders
2120- git https://github.com/yaml/libyaml
src/cmd/aq.zig+2-2
......@@ -43,7 +43,7 @@ pub fn execute(args: [][]u8) !void {
4343 u.fail("unknown command \"{s}\" for \"zigmod aq\"", .{args[0]});
4444}
4545
46pub fn server_fetch(url: string) !std.json.ValueTree {
46pub fn server_fetch(url: string) !std.json.Parsed(std.json.Value) {
4747 const req = try zfetch.Request.init(gpa, url, null);
4848 defer req.deinit();
4949
......@@ -57,7 +57,7 @@ pub fn server_fetch(url: string) !std.json.ValueTree {
5757 const body_content = try r.readAllAlloc(gpa, std.math.maxInt(usize));
5858 const val = try extras.parse_json(gpa, body_content);
5959
60 if (val.root.object.get("message")) |msg| {
60 if (val.value.object.get("message")) |msg| {
6161 std.log.err("server: {s}", .{msg.string});
6262 return error.AquilaBadResponse;
6363 }
src/cmd/aquila/add.zig+2-2
......@@ -19,8 +19,8 @@ pub fn do(dir: std.fs.Dir, pkg_id: string) !string {
1919 const val = try aq.server_fetch(url);
2020
2121 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,
2424 });
2525
2626 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
7777 \\ llc = true;
7878 \\ }
7979 \\ 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 })});
8181 \\ llc = true;
8282 \\ }
8383 \\ 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 });
8585 \\ llc = true;
8686 \\ }
8787 \\ 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
147147 \\ llc = true;
148148 \\ }
149149 \\ 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 })});
151151 \\ llc = true;
152152 \\ }
153153 \\ 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 });
155155 \\ llc = true;
156156 \\ }
157157 \\ vcpkg = vcpkg or pkg.vcpkg;
src/cmd/init.zig+1-1
......@@ -118,7 +118,7 @@ pub fn execute(args: [][]u8) !void {
118118 if (run >= 79) {
119119 const s_ind = (std.mem.lastIndexOfScalar(u8, realtext[start..end], ' ') orelse end) + start;
120120 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);
122122 try w.print("{s}\n", .{realtext[start..ind]});
123123 end = ind + 1;
124124 start = end;
src/cmd/zpm.zig+3-3
......@@ -55,7 +55,7 @@ pub fn execute(args: [][]u8) !void {
5555 u.fail("unknown command \"{s}\" for \"zigmod zpm\"", .{args[0]});
5656}
5757
58pub fn server_fetch(url: string) !std.json.ValueTree {
58pub fn server_fetch(url: string) !std.json.Parsed(std.json.Value) {
5959 const req = try zfetch.Request.init(gpa, url, null);
6060 defer req.deinit();
6161 try req.do(.GET, null, null);
......@@ -69,7 +69,7 @@ pub fn server_fetchArray(url: string) ![]const Package {
6969 var list = std.ArrayList(Package).init(gpa);
7070 errdefer list.deinit();
7171
72 for (val.root.array.items) |item| {
72 for (val.value.array.items) |item| {
7373 if (get(item, "root_file") == null) continue;
7474 try list.append(Package{
7575 .name = item.object.get("name").?.string,
......@@ -78,7 +78,7 @@ pub fn server_fetchArray(url: string) ![]const Package {
7878 .tags = try valueStrArray(item.object.get("tags").?.array.items),
7979 .git = item.object.get("git").?.string,
8080 .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),
8282 .links = try valueLinks(item.object.get("links").?),
8383 });
8484 }
src/cmd/zpm/add.zig+2-2
......@@ -44,14 +44,14 @@ pub fn execute(args: [][]u8) !void {
4444 const _req = try zfetch.Request.init(gpa, _url, null);
4545 defer _req.deinit();
4646 try _req.do(.GET, null, null);
47 break :blk _req.status.code == 200;
47 break :blk @intFromEnum(_req.status) == 200;
4848 };
4949 const has_zigmodyml = blk: {
5050 const _url = try std.mem.join(gpa, "/", &.{ found.git, "blob", "HEAD", "zigmod.yml" });
5151 const _req = try zfetch.Request.init(gpa, _url, null);
5252 defer _req.deinit();
5353 try _req.do(.GET, null, null);
54 break :blk _req.status.code == 200;
54 break :blk @intFromEnum(_req.status) == 200;
5555 };
5656
5757 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 {
1717
1818 const name_col_width = blk: {
1919 var w: usize = 4;
20 for (val.root.array.items) |tag| {
20 for (val.value.array.items) |tag| {
2121 const len = tag.object.get("name").?.string.len;
2222 if (len > w) {
2323 w = len;
......@@ -30,7 +30,7 @@ pub fn execute(args: [][]u8) !void {
3030 try print_c_n(out, ' ', name_col_width - 4);
3131 try out.writeAll("DESCRIPTION\n");
3232
33 for (val.root.array.items) |tag| {
33 for (val.value.array.items) |tag| {
3434 const name = tag.object.get("name").?.string;
3535 try out.writeAll(name);
3636 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 {
118118const alphabet = "0123456789abcdefghijklmnopqrstuvwxyz";
119119
120120pub 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());
122122 var rand = std.rand.DefaultPrng.init(now);
123123 var r = rand.random();
124124 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 {
191191}
192192
193193pub 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);
196196 return input[f..t];
197197}
198198
zig.mod+2-2
......@@ -3,13 +3,13 @@ name: zigmod
33main: src/lib.zig
44license: MIT
55description: A package manager for the Zig programming language.
6min_zig_version: 0.11.0-dev.3620+c76ce25a6
6min_zig_version: 0.11.0
77dependencies:
88 - src: git https://github.com/nektro/zig-yaml
99 - src: git https://github.com/nektro/zig-ansi
1010 - src: git https://github.com/ziglibs/known-folders
1111 - src: git https://github.com/nektro/zig-licenses
12 - src: git https://github.com/truemedian/zfetch
12 - src: git https://github.com/nektro/zfetch
1313 - src: git https://github.com/nektro/zig-detect-license
1414 - src: git https://github.com/nektro/zig-inquirer
1515 - src: git https://github.com/nektro/arqv-ini
zigmod.lock+9-10
......@@ -1,19 +1,18 @@
112
2git https://github.com/MasterQ32/zig-uri commit-d4299ad6043ad19f2ce0676687b0bff57273eae2
3git https://github.com/marlersoft/zigwin32 commit-b70e7f818d77a0c0f39b0bd9c549e16439ff5780
4git https://github.com/nektro/arqv-ini commit-ee395fd34e152d9067def609d86b7af5382b83b1
5git https://github.com/nektro/iguanaTLS commit-e70995575b397f33d798339d4f1656bcdf0ab82f
6git https://github.com/nektro/zig-ansi commit-faf9585bfe5980c24748ee8a3e6a22faaa50b437
2git https://github.com/marlersoft/zigwin32 commit-007649ade45ffb544de3aafbb112de25064d3d92
3git https://github.com/nektro/arqv-ini commit-ddbe89bb0d9085e939bcbc713caeb2b7cf852bae
4git https://github.com/nektro/iguanaTLS commit-c932f557865abaa1d06cd88e9b22a9f3e583fa59
5git https://github.com/nektro/zfetch commit-f51277414a2309f776fb79f3d55f26e37f9a54da
6git https://github.com/nektro/zig-ansi commit-ac607e4e7ac36d46cc67c8786262578330543a36
77git https://github.com/nektro/zig-detect-license commit-8f13721bd18c0e546841b6f2e11da839550d6287
8git https://github.com/nektro/zig-extras commit-ff267312e8d714c9b9d8c44ad3291f6e509dc12f
8git https://github.com/nektro/zig-extras commit-54abdc5bce0b243601ef4808bce1c29e1a46cdec
99git https://github.com/nektro/zig-inquirer commit-5cc2a5565d04fe2c0085f0d6818590e800d9dcf7
1010git https://github.com/nektro/zig-leven commit-550cabd5a18ace5e67761bc5b867c10e926f4314
1111git https://github.com/nektro/zig-licenses commit-c9b8cbf3565675a056ad4e9b57cb4f84020e7680
1212git https://github.com/nektro/zig-licenses-text commit-3c07c6e4eb0965dafd0b029c632f823631b3169c
1313git https://github.com/nektro/zig-range commit-4b2f12808aa09be4b27a163efc424dd4e0415992
14git https://github.com/nektro/zig-time commit-ca9c0e6b644d74c1d549cc2c1ee22113aa021bd8
14git https://github.com/nektro/zig-time commit-12fad367a5282827aad7e12f0e9cd36f672c4010
1515git https://github.com/nektro/zig-yaml commit-e56b9fed6c0afd1c4d29bedc08c3899ffe1165e9
16git https://github.com/truemedian/hzzp commit-501386e13b2f7849128f3b271d23de6127b1d9d7
17git https://github.com/truemedian/zfetch commit-829973144f680cd16be16923041fa810c1dee417
18git https://github.com/ziglibs/known-folders commit-d13ba6137084e55f873f6afb67447fe8906cc951
16git https://github.com/truemedian/hzzp commit-305aca97fce78eb3e787d57691a5eed5512bece7
17git https://github.com/ziglibs/known-folders commit-fa75e1bc672952efa0cf06160bbd942b47f6d59b
1918git https://github.com/yaml/libyaml tag-0.2.5