authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-03-13 16:04:21 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-03-13 16:04:21 -07:00
log89d24825ecd05fb81e5fb8cc33a15f0ee1fd14c1
tree50feca710a190d6a78370ef8eb17c1d07beea16c
parent806e5f4c6994e43f07d32c856db7722c75063332

update to zig master 0.11.0-dev.1681+0bb178bbb

closes #91

7 files changed, 22 insertions(+), 24 deletions(-)

src/cmd/fetch.zig+6-6
......@@ -314,7 +314,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul
314314 try w.writeAll(" &.{} },\n");
315315 } else {
316316 try w.writeAll(" &.{");
317 for (mod.deps) |moddep, j| {
317 for (mod.deps, 0..) |moddep, j| {
318318 if (moddep.main.len == 0) continue;
319319 try w.print(" _{s}.pkg.?", .{moddep.id[0..12]});
320320 if (j != mod.deps.len - 1) try w.writeAll(",");
......@@ -324,7 +324,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul
324324 }
325325 if (mod.c_include_dirs.len > 0) {
326326 try w.writeAll(" .c_include_dirs = &.{");
327 for (mod.c_include_dirs) |item, j| {
327 for (mod.c_include_dirs, 0..) |item, j| {
328328 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});
329329 if (j != mod.c_include_dirs.len - 1) try w.writeAll(",");
330330 }
......@@ -332,7 +332,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul
332332 }
333333 if (mod.c_source_files.len > 0) {
334334 try w.writeAll(" .c_source_files = &.{");
335 for (mod.c_source_files) |item, j| {
335 for (mod.c_source_files, 0..) |item, j| {
336336 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});
337337 if (j != mod.c_source_files.len - 1) try w.writeAll(",");
338338 }
......@@ -340,7 +340,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul
340340 }
341341 if (mod.c_source_flags.len > 0) {
342342 try w.writeAll(" .c_source_flags = &.{");
343 for (mod.c_source_flags) |item, j| {
343 for (mod.c_source_flags, 0..) |item, j| {
344344 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});
345345 if (j != mod.c_source_flags.len - 1) try w.writeAll(",");
346346 }
......@@ -348,7 +348,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul
348348 }
349349 if (mod.has_syslib_deps()) {
350350 try w.writeAll(" .system_libs = &.{");
351 for (mod.deps) |item, j| {
351 for (mod.deps, 0..) |item, j| {
352352 if (!(item.type == .system_lib)) continue;
353353 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)});
354354 if (j != mod.deps.len - 1) try w.writeAll(",");
......@@ -357,7 +357,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul
357357 }
358358 if (mod.has_framework_deps()) {
359359 try w.writeAll(" .frameworks = &.{");
360 for (mod.deps) |item, j| {
360 for (mod.deps, 0..) |item, j| {
361361 if (!(item.type == .system_lib)) continue;
362362 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)});
363363 if (j != mod.deps.len - 1) try w.writeAll(",");
src/cmd/generate.zig+8-8
......@@ -167,7 +167,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D
167167 \\
168168 \\ pub fn zp(self: *const Package, b: *std.build.Builder) ModuleDependency {
169169 \\ var temp: [100]ModuleDependency = undefined;
170 \\ for (self.deps) |item, i| {
170 \\ for (self.deps, 0..) |item, i| {
171171 \\ temp[i] = item.zp(b);
172172 \\ }
173173 \\ return .{
......@@ -245,7 +245,7 @@ fn print_deps(w: std.fs.File.Writer, m: zigmod.Module) !void {
245245fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath: string, notdone: *std.ArrayList(zigmod.Module), done: *std.ArrayList(zigmod.Module)) !void {
246246 var len: usize = notdone.items.len;
247247 while (notdone.items.len > 0) {
248 for (notdone.items) |mod, i| {
248 for (notdone.items, 0..) |mod, i| {
249249 if (contains_all(mod.deps, done.items)) {
250250 try w.print(
251251 \\ pub var _{s} = Package{{
......@@ -267,7 +267,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath:
267267
268268 if (!mod.has_no_zig_deps()) {
269269 try w.writeAll(" .deps = &[_]*Package{");
270 for (mod.deps) |moddep, j| {
270 for (mod.deps, 0..) |moddep, j| {
271271 if (moddep.main.len == 0) continue;
272272 try w.print(" &_{s}", .{moddep.id[0..12]});
273273 if (j != mod.deps.len - 1) try w.writeAll(",");
......@@ -277,7 +277,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath:
277277 }
278278 if (mod.c_include_dirs.len > 0) {
279279 try w.writeAll(" .c_include_dirs = &.{");
280 for (mod.c_include_dirs) |item, j| {
280 for (mod.c_include_dirs, 0..) |item, j| {
281281 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});
282282 if (j != mod.c_include_dirs.len - 1) try w.writeAll(",");
283283 }
......@@ -285,7 +285,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath:
285285 }
286286 if (mod.c_source_files.len > 0) {
287287 try w.writeAll(" .c_source_files = &.{");
288 for (mod.c_source_files) |item, j| {
288 for (mod.c_source_files, 0..) |item, j| {
289289 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});
290290 if (j != mod.c_source_files.len - 1) try w.writeAll(",");
291291 }
......@@ -293,7 +293,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath:
293293 }
294294 if (mod.c_source_flags.len > 0) {
295295 try w.writeAll(" .c_source_flags = &.{");
296 for (mod.c_source_flags) |item, j| {
296 for (mod.c_source_flags, 0..) |item, j| {
297297 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});
298298 if (j != mod.c_source_flags.len - 1) try w.writeAll(",");
299299 }
......@@ -301,7 +301,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath:
301301 }
302302 if (mod.has_syslib_deps()) {
303303 try w.writeAll(" .system_libs = &.{");
304 for (mod.deps) |item, j| {
304 for (mod.deps, 0..) |item, j| {
305305 if (!(item.type == .system_lib)) continue;
306306 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)});
307307 if (j != mod.deps.len - 1) try w.writeAll(",");
......@@ -310,7 +310,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath:
310310 }
311311 if (mod.has_framework_deps()) {
312312 try w.writeAll(" .frameworks = &.{");
313 for (mod.deps) |item, j| {
313 for (mod.deps, 0..) |item, j| {
314314 if (!(item.type == .system_lib)) continue;
315315 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)});
316316 if (j != mod.deps.len - 1) try w.writeAll(",");
src/cmd/zpm/search.zig+1-2
......@@ -1,7 +1,6 @@
11const std = @import("std");
22const gpa = std.heap.c_allocator;
33const extras = @import("extras");
4const range = extras.range;
54
65const zpm = @import("./../zpm.zig");
76
......@@ -57,7 +56,7 @@ pub fn execute(args: [][]u8) !void {
5756}
5857
5958fn print_c_n(out: anytype, c: u8, n: usize) !void {
60 for (range(n)) |_| {
59 for (0..n) |_| {
6160 try out.writeAll(&.{c});
6261 }
6362}
src/cmd/zpm/tags.zig+1-2
......@@ -1,7 +1,6 @@
11const std = @import("std");
22const gpa = std.heap.c_allocator;
33const extras = @import("extras");
4const range = extras.range;
54
65const zpm = @import("./../zpm.zig");
76
......@@ -41,7 +40,7 @@ pub fn execute(args: [][]u8) !void {
4140}
4241
4342fn print_c_n(out: anytype, c: u8, n: usize) !void {
44 for (range(n)) |_| {
43 for (0..n) |_| {
4544 try out.writeAll(&.{c});
4645 }
4746}
src/util/funcs.zig+1-1
......@@ -244,7 +244,7 @@ pub fn indexOfN(haystack: string, needle: u8, n: usize) ?usize {
244244}
245245
246246pub fn indexOfAfter(haystack: string, needle: u8, after: usize) ?usize {
247 for (haystack) |c, i| {
247 for (haystack, 0..) |c, i| {
248248 if (i <= after) continue;
249249 if (c == needle) return i;
250250 }
src/util/module.zig+1-1
......@@ -151,7 +151,7 @@ pub const Module = struct {
151151 }
152152
153153 pub fn lessThan(_: void, lhs: Module, rhs: Module) bool {
154 for (lhs.clean_path) |_, i| {
154 for (lhs.clean_path, 0..) |_, i| {
155155 if (i == rhs.clean_path.len) return false;
156156 if (lhs.clean_path[i] < rhs.clean_path[i]) return true;
157157 if (lhs.clean_path[i] > rhs.clean_path[i]) return false;
zigmod.lock+4-4
......@@ -1,20 +1,20 @@
112
22git https://github.com/MasterQ32/zig-uri commit-d4299ad6043ad19f2ce0676687b0bff57273eae2
3git https://github.com/marlersoft/zigwin32 commit-56cf335ddcdb72a6d7059c5b6f131263830b3eca
3git https://github.com/marlersoft/zigwin32 commit-79c0144225dc015a5c0253b5af30356aa6dc6426
44git https://github.com/nektro/arqv-ini commit-ee395fd34e152d9067def609d86b7af5382b83b1
55git https://github.com/nektro/iguanaTLS commit-5dee3ead2b289319080834add91b5f35dfdb1847
66git https://github.com/nektro/zig-ansi commit-8d6fdb4983a616940c1d5137110292a7862f6a7e
77git https://github.com/nektro/zig-detect-license commit-de5c285d999eea68b9189b48bb000243fef0a689
8git https://github.com/nektro/zig-extras commit-b45c99e2e747e3bb8df5e1051078cacb1470a430
8git https://github.com/nektro/zig-extras commit-d34ac633f0a0af8d348b66a38e7497d031f027b1
99git https://github.com/nektro/zig-inquirer commit-25e35a46400cfa1d7278436c0b7d14d314889d7c
1010git https://github.com/nektro/zig-json commit-0e7d026b0d3889ed7f96e1b24566a66cd9df6cb3
1111git https://github.com/nektro/zig-leven commit-ab852cf74fa0b4edc530d925f0654b62c60365bf
1212git https://github.com/nektro/zig-licenses commit-c9b8cbf3565675a056ad4e9b57cb4f84020e7680
1313git https://github.com/nektro/zig-licenses-text commit-3c07c6e4eb0965dafd0b029c632f823631b3169c
1414git https://github.com/nektro/zig-range commit-4b2f12808aa09be4b27a163efc424dd4e0415992
15git https://github.com/nektro/zig-time commit-aff2df866eb16ad781e26a25f8b664d498e2211a
16git https://github.com/truemedian/hzzp commit-2d2ab34b666e6806a6f6c98cc50ca94e606c9103
15git https://github.com/nektro/zig-time commit-bfb7da7b8ee92b6c07f90a14b044a9b8f4df182c
1716git https://github.com/nektro/zig-yaml commit-3f3641e90697546e7f8aeef365815c4ccab168b0
17git https://github.com/truemedian/hzzp commit-9b5de4d8626ddedf925bf82dbe49610513485b9d
1818git https://github.com/truemedian/zfetch commit-829973144f680cd16be16923041fa810c1dee417
1919git https://github.com/ziglibs/known-folders commit-6b37490ac7285133bf09441850b8102c9728a776
2020git https://github.com/yaml/libyaml tag-0.2.5