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...@@ -314,7 +314,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul
314 try w.writeAll(" &.{} },\n");314 try w.writeAll(" &.{} },\n");
315 } else {315 } else {
316 try w.writeAll(" &.{");316 try w.writeAll(" &.{");
317 for (mod.deps) |moddep, j| {317 for (mod.deps, 0..) |moddep, j| {
318 if (moddep.main.len == 0) continue;318 if (moddep.main.len == 0) continue;
319 try w.print(" _{s}.pkg.?", .{moddep.id[0..12]});319 try w.print(" _{s}.pkg.?", .{moddep.id[0..12]});
320 if (j != mod.deps.len - 1) try w.writeAll(",");320 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...@@ -324,7 +324,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul
324 }324 }
325 if (mod.c_include_dirs.len > 0) {325 if (mod.c_include_dirs.len > 0) {
326 try w.writeAll(" .c_include_dirs = &.{");326 try w.writeAll(" .c_include_dirs = &.{");
327 for (mod.c_include_dirs) |item, j| {327 for (mod.c_include_dirs, 0..) |item, j| {
328 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});328 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});
329 if (j != mod.c_include_dirs.len - 1) try w.writeAll(",");329 if (j != mod.c_include_dirs.len - 1) try w.writeAll(",");
330 }330 }
...@@ -332,7 +332,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul...@@ -332,7 +332,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul
332 }332 }
333 if (mod.c_source_files.len > 0) {333 if (mod.c_source_files.len > 0) {
334 try w.writeAll(" .c_source_files = &.{");334 try w.writeAll(" .c_source_files = &.{");
335 for (mod.c_source_files) |item, j| {335 for (mod.c_source_files, 0..) |item, j| {
336 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});336 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});
337 if (j != mod.c_source_files.len - 1) try w.writeAll(",");337 if (j != mod.c_source_files.len - 1) try w.writeAll(",");
338 }338 }
...@@ -340,7 +340,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul...@@ -340,7 +340,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul
340 }340 }
341 if (mod.c_source_flags.len > 0) {341 if (mod.c_source_flags.len > 0) {
342 try w.writeAll(" .c_source_flags = &.{");342 try w.writeAll(" .c_source_flags = &.{");
343 for (mod.c_source_flags) |item, j| {343 for (mod.c_source_flags, 0..) |item, j| {
344 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});344 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});
345 if (j != mod.c_source_flags.len - 1) try w.writeAll(",");345 if (j != mod.c_source_flags.len - 1) try w.writeAll(",");
346 }346 }
...@@ -348,7 +348,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul...@@ -348,7 +348,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul
348 }348 }
349 if (mod.has_syslib_deps()) {349 if (mod.has_syslib_deps()) {
350 try w.writeAll(" .system_libs = &.{");350 try w.writeAll(" .system_libs = &.{");
351 for (mod.deps) |item, j| {351 for (mod.deps, 0..) |item, j| {
352 if (!(item.type == .system_lib)) continue;352 if (!(item.type == .system_lib)) continue;
353 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)});353 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)});
354 if (j != mod.deps.len - 1) try w.writeAll(",");354 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...@@ -357,7 +357,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul
357 }357 }
358 if (mod.has_framework_deps()) {358 if (mod.has_framework_deps()) {
359 try w.writeAll(" .frameworks = &.{");359 try w.writeAll(" .frameworks = &.{");
360 for (mod.deps) |item, j| {360 for (mod.deps, 0..) |item, j| {
361 if (!(item.type == .system_lib)) continue;361 if (!(item.type == .system_lib)) continue;
362 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)});362 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)});
363 if (j != mod.deps.len - 1) try w.writeAll(",");363 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...@@ -167,7 +167,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D
167 \\167 \\
168 \\ pub fn zp(self: *const Package, b: *std.build.Builder) ModuleDependency {168 \\ pub fn zp(self: *const Package, b: *std.build.Builder) ModuleDependency {
169 \\ var temp: [100]ModuleDependency = undefined;169 \\ var temp: [100]ModuleDependency = undefined;
170 \\ for (self.deps) |item, i| {170 \\ for (self.deps, 0..) |item, i| {
171 \\ temp[i] = item.zp(b);171 \\ temp[i] = item.zp(b);
172 \\ }172 \\ }
173 \\ return .{173 \\ return .{
...@@ -245,7 +245,7 @@ fn print_deps(w: std.fs.File.Writer, m: zigmod.Module) !void {...@@ -245,7 +245,7 @@ fn print_deps(w: std.fs.File.Writer, m: zigmod.Module) !void {
245fn 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 {245fn 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 {
246 var len: usize = notdone.items.len;246 var len: usize = notdone.items.len;
247 while (notdone.items.len > 0) {247 while (notdone.items.len > 0) {
248 for (notdone.items) |mod, i| {248 for (notdone.items, 0..) |mod, i| {
249 if (contains_all(mod.deps, done.items)) {249 if (contains_all(mod.deps, done.items)) {
250 try w.print(250 try w.print(
251 \\ pub var _{s} = Package{{251 \\ pub var _{s} = Package{{
...@@ -267,7 +267,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath:...@@ -267,7 +267,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath:
267267
268 if (!mod.has_no_zig_deps()) {268 if (!mod.has_no_zig_deps()) {
269 try w.writeAll(" .deps = &[_]*Package{");269 try w.writeAll(" .deps = &[_]*Package{");
270 for (mod.deps) |moddep, j| {270 for (mod.deps, 0..) |moddep, j| {
271 if (moddep.main.len == 0) continue;271 if (moddep.main.len == 0) continue;
272 try w.print(" &_{s}", .{moddep.id[0..12]});272 try w.print(" &_{s}", .{moddep.id[0..12]});
273 if (j != mod.deps.len - 1) try w.writeAll(",");273 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:...@@ -277,7 +277,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath:
277 }277 }
278 if (mod.c_include_dirs.len > 0) {278 if (mod.c_include_dirs.len > 0) {
279 try w.writeAll(" .c_include_dirs = &.{");279 try w.writeAll(" .c_include_dirs = &.{");
280 for (mod.c_include_dirs) |item, j| {280 for (mod.c_include_dirs, 0..) |item, j| {
281 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});281 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});
282 if (j != mod.c_include_dirs.len - 1) try w.writeAll(",");282 if (j != mod.c_include_dirs.len - 1) try w.writeAll(",");
283 }283 }
...@@ -285,7 +285,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath:...@@ -285,7 +285,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath:
285 }285 }
286 if (mod.c_source_files.len > 0) {286 if (mod.c_source_files.len > 0) {
287 try w.writeAll(" .c_source_files = &.{");287 try w.writeAll(" .c_source_files = &.{");
288 for (mod.c_source_files) |item, j| {288 for (mod.c_source_files, 0..) |item, j| {
289 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});289 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});
290 if (j != mod.c_source_files.len - 1) try w.writeAll(",");290 if (j != mod.c_source_files.len - 1) try w.writeAll(",");
291 }291 }
...@@ -293,7 +293,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath:...@@ -293,7 +293,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath:
293 }293 }
294 if (mod.c_source_flags.len > 0) {294 if (mod.c_source_flags.len > 0) {
295 try w.writeAll(" .c_source_flags = &.{");295 try w.writeAll(" .c_source_flags = &.{");
296 for (mod.c_source_flags) |item, j| {296 for (mod.c_source_flags, 0..) |item, j| {
297 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});297 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)});
298 if (j != mod.c_source_flags.len - 1) try w.writeAll(",");298 if (j != mod.c_source_flags.len - 1) try w.writeAll(",");
299 }299 }
...@@ -301,7 +301,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath:...@@ -301,7 +301,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath:
301 }301 }
302 if (mod.has_syslib_deps()) {302 if (mod.has_syslib_deps()) {
303 try w.writeAll(" .system_libs = &.{");303 try w.writeAll(" .system_libs = &.{");
304 for (mod.deps) |item, j| {304 for (mod.deps, 0..) |item, j| {
305 if (!(item.type == .system_lib)) continue;305 if (!(item.type == .system_lib)) continue;
306 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)});306 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)});
307 if (j != mod.deps.len - 1) try w.writeAll(",");307 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:...@@ -310,7 +310,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath:
310 }310 }
311 if (mod.has_framework_deps()) {311 if (mod.has_framework_deps()) {
312 try w.writeAll(" .frameworks = &.{");312 try w.writeAll(" .frameworks = &.{");
313 for (mod.deps) |item, j| {313 for (mod.deps, 0..) |item, j| {
314 if (!(item.type == .system_lib)) continue;314 if (!(item.type == .system_lib)) continue;
315 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)});315 try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)});
316 if (j != mod.deps.len - 1) try w.writeAll(",");316 if (j != mod.deps.len - 1) try w.writeAll(",");
src/cmd/zpm/search.zig+1-2
...@@ -1,7 +1,6 @@...@@ -1,7 +1,6 @@
1const std = @import("std");1const std = @import("std");
2const gpa = std.heap.c_allocator;2const gpa = std.heap.c_allocator;
3const extras = @import("extras");3const extras = @import("extras");
4const range = extras.range;
54
6const zpm = @import("./../zpm.zig");5const zpm = @import("./../zpm.zig");
76
...@@ -57,7 +56,7 @@ pub fn execute(args: [][]u8) !void {...@@ -57,7 +56,7 @@ pub fn execute(args: [][]u8) !void {
57}56}
5857
59fn print_c_n(out: anytype, c: u8, n: usize) !void {58fn print_c_n(out: anytype, c: u8, n: usize) !void {
60 for (range(n)) |_| {59 for (0..n) |_| {
61 try out.writeAll(&.{c});60 try out.writeAll(&.{c});
62 }61 }
63}62}
src/cmd/zpm/tags.zig+1-2
...@@ -1,7 +1,6 @@...@@ -1,7 +1,6 @@
1const std = @import("std");1const std = @import("std");
2const gpa = std.heap.c_allocator;2const gpa = std.heap.c_allocator;
3const extras = @import("extras");3const extras = @import("extras");
4const range = extras.range;
54
6const zpm = @import("./../zpm.zig");5const zpm = @import("./../zpm.zig");
76
...@@ -41,7 +40,7 @@ pub fn execute(args: [][]u8) !void {...@@ -41,7 +40,7 @@ pub fn execute(args: [][]u8) !void {
41}40}
4241
43fn print_c_n(out: anytype, c: u8, n: usize) !void {42fn print_c_n(out: anytype, c: u8, n: usize) !void {
44 for (range(n)) |_| {43 for (0..n) |_| {
45 try out.writeAll(&.{c});44 try out.writeAll(&.{c});
46 }45 }
47}46}
src/util/funcs.zig+1-1
...@@ -244,7 +244,7 @@ pub fn indexOfN(haystack: string, needle: u8, n: usize) ?usize {...@@ -244,7 +244,7 @@ pub fn indexOfN(haystack: string, needle: u8, n: usize) ?usize {
244}244}
245245
246pub fn indexOfAfter(haystack: string, needle: u8, after: usize) ?usize {246pub fn indexOfAfter(haystack: string, needle: u8, after: usize) ?usize {
247 for (haystack) |c, i| {247 for (haystack, 0..) |c, i| {
248 if (i <= after) continue;248 if (i <= after) continue;
249 if (c == needle) return i;249 if (c == needle) return i;
250 }250 }
src/util/module.zig+1-1
...@@ -151,7 +151,7 @@ pub const Module = struct {...@@ -151,7 +151,7 @@ pub const Module = struct {
151 }151 }
152152
153 pub fn lessThan(_: void, lhs: Module, rhs: Module) bool {153 pub fn lessThan(_: void, lhs: Module, rhs: Module) bool {
154 for (lhs.clean_path) |_, i| {154 for (lhs.clean_path, 0..) |_, i| {
155 if (i == rhs.clean_path.len) return false;155 if (i == rhs.clean_path.len) return false;
156 if (lhs.clean_path[i] < rhs.clean_path[i]) return true;156 if (lhs.clean_path[i] < rhs.clean_path[i]) return true;
157 if (lhs.clean_path[i] > rhs.clean_path[i]) return false;157 if (lhs.clean_path[i] > rhs.clean_path[i]) return false;
zigmod.lock+4-4
...@@ -1,20 +1,20 @@...@@ -1,20 +1,20 @@
1212
2git https://github.com/MasterQ32/zig-uri commit-d4299ad6043ad19f2ce0676687b0bff57273eae22git https://github.com/MasterQ32/zig-uri commit-d4299ad6043ad19f2ce0676687b0bff57273eae2
3git https://github.com/marlersoft/zigwin32 commit-56cf335ddcdb72a6d7059c5b6f131263830b3eca3git https://github.com/marlersoft/zigwin32 commit-79c0144225dc015a5c0253b5af30356aa6dc6426
4git https://github.com/nektro/arqv-ini commit-ee395fd34e152d9067def609d86b7af5382b83b14git https://github.com/nektro/arqv-ini commit-ee395fd34e152d9067def609d86b7af5382b83b1
5git https://github.com/nektro/iguanaTLS commit-5dee3ead2b289319080834add91b5f35dfdb18475git https://github.com/nektro/iguanaTLS commit-5dee3ead2b289319080834add91b5f35dfdb1847
6git https://github.com/nektro/zig-ansi commit-8d6fdb4983a616940c1d5137110292a7862f6a7e6git https://github.com/nektro/zig-ansi commit-8d6fdb4983a616940c1d5137110292a7862f6a7e
7git https://github.com/nektro/zig-detect-license commit-de5c285d999eea68b9189b48bb000243fef0a6897git https://github.com/nektro/zig-detect-license commit-de5c285d999eea68b9189b48bb000243fef0a689
8git https://github.com/nektro/zig-extras commit-b45c99e2e747e3bb8df5e1051078cacb1470a4308git https://github.com/nektro/zig-extras commit-d34ac633f0a0af8d348b66a38e7497d031f027b1
9git https://github.com/nektro/zig-inquirer commit-25e35a46400cfa1d7278436c0b7d14d314889d7c9git https://github.com/nektro/zig-inquirer commit-25e35a46400cfa1d7278436c0b7d14d314889d7c
10git https://github.com/nektro/zig-json commit-0e7d026b0d3889ed7f96e1b24566a66cd9df6cb310git https://github.com/nektro/zig-json commit-0e7d026b0d3889ed7f96e1b24566a66cd9df6cb3
11git https://github.com/nektro/zig-leven commit-ab852cf74fa0b4edc530d925f0654b62c60365bf11git https://github.com/nektro/zig-leven commit-ab852cf74fa0b4edc530d925f0654b62c60365bf
12git https://github.com/nektro/zig-licenses commit-c9b8cbf3565675a056ad4e9b57cb4f84020e768012git https://github.com/nektro/zig-licenses commit-c9b8cbf3565675a056ad4e9b57cb4f84020e7680
13git https://github.com/nektro/zig-licenses-text commit-3c07c6e4eb0965dafd0b029c632f823631b3169c13git https://github.com/nektro/zig-licenses-text commit-3c07c6e4eb0965dafd0b029c632f823631b3169c
14git https://github.com/nektro/zig-range commit-4b2f12808aa09be4b27a163efc424dd4e041599214git https://github.com/nektro/zig-range commit-4b2f12808aa09be4b27a163efc424dd4e0415992
15git https://github.com/nektro/zig-time commit-aff2df866eb16ad781e26a25f8b664d498e2211a15git https://github.com/nektro/zig-time commit-bfb7da7b8ee92b6c07f90a14b044a9b8f4df182c
16git https://github.com/truemedian/hzzp commit-2d2ab34b666e6806a6f6c98cc50ca94e606c9103
17git https://github.com/nektro/zig-yaml commit-3f3641e90697546e7f8aeef365815c4ccab168b016git https://github.com/nektro/zig-yaml commit-3f3641e90697546e7f8aeef365815c4ccab168b0
17git https://github.com/truemedian/hzzp commit-9b5de4d8626ddedf925bf82dbe49610513485b9d
18git https://github.com/truemedian/zfetch commit-829973144f680cd16be16923041fa810c1dee41718git https://github.com/truemedian/zfetch commit-829973144f680cd16be16923041fa810c1dee417
19git https://github.com/ziglibs/known-folders commit-6b37490ac7285133bf09441850b8102c9728a77619git https://github.com/ziglibs/known-folders commit-6b37490ac7285133bf09441850b8102c9728a776
20git https://github.com/yaml/libyaml tag-0.2.520git https://github.com/yaml/libyaml tag-0.2.5