From a6d13af0c257701137db0d031d1898fd838fc158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Fro=C5=82ow?= Date: Mon, 20 May 2024 21:32:32 +0200 Subject: [PATCH 1/3] the Earth --- exercises/047_methods.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/047_methods.zig b/exercises/047_methods.zig index d2e3ee6..3221ca2 100644 --- a/exercises/047_methods.zig +++ b/exercises/047_methods.zig @@ -40,7 +40,7 @@ // Okay, you're armed. // // Now, please zap the alien structs until they're all gone or -// Earth will be doomed! +// the Earth will be doomed! // const std = @import("std"); From b224ed510eb3277c9b6b80412eb615cb27b0eeef Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Wed, 29 May 2024 21:20:28 +0200 Subject: [PATCH 2/3] Fixed the changes from reworking std.Progress. For details: https://github.com/ziglang/zig/pull/20059 --- README.md | 3 ++- build.zig | 10 +++++----- test/tests.zig | 8 ++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d08dd2d..edc300d 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,8 @@ that if you update one, you may need to also update the other. ### Version Changes -Version-0.12.0-dev.3518 +Version-0.13.0-dev.339 +* *2024-05-29* zig 0.13.0-dev.339 - rework std.Progress - see [#20059](https://github.com/ziglang/zig/pull/20059) * *2024-03-21* zig 0.12.0-dev.3518 - change to @fieldParentPtr - see [#19470](https://github.com/ziglang/zig/pull/19470) * *2024-03-21* zig 0.12.0-dev.3397 - rename std.os to std.posix - see [#5019](https://github.com/ziglang/zig/issues/5019) * *2024-03-14* zig 0.12.0-dev.3302 - changes in `std.fmt` - floating-point formatting implementation - see [#19229](https://github.com/ziglang/zig/pull/19229) diff --git a/build.zig b/build.zig index b03e389..0d83737 100644 --- a/build.zig +++ b/build.zig @@ -15,7 +15,7 @@ const print = std.debug.print; // 1) Getting Started // 2) Version Changes comptime { - const required_zig = "0.12.0-dev.3518"; + const required_zig = "0.13.0-dev.339"; const current_zig = builtin.zig_version; const min_zig = std.SemanticVersion.parse(required_zig) catch unreachable; if (current_zig.order(min_zig) == .lt) { @@ -244,7 +244,7 @@ const ZiglingStep = struct { return self; } - fn make(step: *Step, prog_node: *std.Progress.Node) !void { + fn make(step: *Step, prog_node: std.Progress.Node) !void { // NOTE: Using exit code 2 will prevent the Zig compiler to print the message: // "error: the following build command failed with exit code 1:..." const self: *ZiglingStep = @alignCast(@fieldParentPtr("step", step)); @@ -279,7 +279,7 @@ const ZiglingStep = struct { self.printErrors(); } - fn run(self: *ZiglingStep, exe_path: []const u8, _: *std.Progress.Node) !void { + fn run(self: *ZiglingStep, exe_path: []const u8, _: std.Progress.Node) !void { resetLine(); print("Checking: {s}\n", .{self.exercise.main_file}); @@ -375,7 +375,7 @@ const ZiglingStep = struct { print("{s}PASSED{s}\n\n", .{ green_text, reset_text }); } - fn compile(self: *ZiglingStep, prog_node: *std.Progress.Node) !?[]const u8 { + fn compile(self: *ZiglingStep, prog_node: std.Progress.Node) !?[]const u8 { print("Compiling: {s}\n", .{self.exercise.main_file}); const b = self.step.owner; @@ -494,7 +494,7 @@ const PrintStep = struct { return self; } - fn make(step: *Step, _: *std.Progress.Node) !void { + fn make(step: *Step, _: std.Progress.Node) !void { const self: *PrintStep = @alignCast(@fieldParentPtr("step", step)); print("{s}", .{self.message}); } diff --git a/test/tests.zig b/test/tests.zig index 5ee5365..126a1cd 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -150,7 +150,7 @@ const CheckNamedStep = struct { return self; } - fn make(step: *Step, _: *std.Progress.Node) !void { + fn make(step: *Step, _: std.Progress.Node) !void { const b = step.owner; const self: *CheckNamedStep = @alignCast(@fieldParentPtr("step", step)); const ex = self.exercise; @@ -202,7 +202,7 @@ const CheckStep = struct { return self; } - fn make(step: *Step, _: *std.Progress.Node) !void { + fn make(step: *Step, _: std.Progress.Node) !void { const b = step.owner; const self: *CheckStep = @alignCast(@fieldParentPtr("step", step)); const exercises = self.exercises; @@ -325,7 +325,7 @@ const FailStep = struct { return self; } - fn make(step: *Step, _: *std.Progress.Node) !void { + fn make(step: *Step, _: std.Progress.Node) !void { const b = step.owner; const self: *FailStep = @alignCast(@fieldParentPtr("step", step)); @@ -368,7 +368,7 @@ const HealStep = struct { return self; } - fn make(step: *Step, _: *std.Progress.Node) !void { + fn make(step: *Step, _: std.Progress.Node) !void { const b = step.owner; const self: *HealStep = @alignCast(@fieldParentPtr("step", step)); From 0279826f5b08914fff52eee4e41d8355ee279d0b Mon Sep 17 00:00:00 2001 From: Nico Elbers Date: Thu, 30 May 2024 18:23:28 +0200 Subject: [PATCH 3/3] Ignore .zig-cache for new zig versions zig cache directory was updated in ziglang/zig#20115 --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f07c7a1..53a6184 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ -/zig-cache/ +/.zig-cache/ /zig-out/ /answers/ /patches/healed/ /output/ + +# Leave this in here for older zig versions +/zig-cache/