From 755911747fe9f4833e006421cde7961089533f47 Mon Sep 17 00:00:00 2001 From: Alexander Saltanov Date: Tue, 6 Feb 2024 00:06:19 +0300 Subject: [PATCH 1/3] Fix zig_exe location in Build struct Reflect Zig breaking changes as of https://github.com/ziglang/zig/commit/105db13536b4dc2affe130cb8d2eee6c97c89bcd --- build.zig | 2 +- test/tests.zig | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.zig b/build.zig index ea47f11..779b9e4 100644 --- a/build.zig +++ b/build.zig @@ -386,7 +386,7 @@ const ZiglingStep = struct { var zig_args = std.ArrayList([]const u8).init(b.allocator); defer zig_args.deinit(); - zig_args.append(b.zig_exe) catch @panic("OOM"); + zig_args.append(b.graph.zig_exe) catch @panic("OOM"); const cmd = switch (self.exercise.kind) { .exe => "build-exe", diff --git a/test/tests.zig b/test/tests.zig index 0a19277..9ab15b3 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -33,7 +33,7 @@ pub fn addCliTests(b: *std.Build, exercises: []const Exercise) *Step { const n = ex.number(); const cmd = b.addSystemCommand(&.{ - b.zig_exe, + b.graph.zig_exe, "build", "-Dhealed", b.fmt("-Dhealed-path={s}", .{tmp_path}), @@ -69,7 +69,7 @@ pub fn addCliTests(b: *std.Build, exercises: []const Exercise) *Step { // TODO: when an exercise is modified, the cache is not invalidated. const cmd = b.addSystemCommand(&.{ - b.zig_exe, + b.graph.zig_exe, "build", "-Dhealed", b.fmt("-Dhealed-path={s}", .{tmp_path}), @@ -99,7 +99,7 @@ pub fn addCliTests(b: *std.Build, exercises: []const Exercise) *Step { const n = ex.number(); const cmd = b.addSystemCommand(&.{ - b.zig_exe, + b.graph.zig_exe, "build", b.fmt("-Dn={}", .{n}), }); From 8257ccb5c8bb35a3f7720bfebbe8c9ab603d3565 Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Sun, 11 Feb 2024 14:07:37 +0000 Subject: [PATCH 2/3] Text improvement closes #47 --- exercises/103_tokenization.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/103_tokenization.zig b/exercises/103_tokenization.zig index 7f59766..eded880 100644 --- a/exercises/103_tokenization.zig +++ b/exercises/103_tokenization.zig @@ -1,9 +1,9 @@ // // The functionality of the standard library is becoming increasingly -// important in Zig. On the one hand, it is helpful to look at how +// important in Zig. First of all, it is helpful to take a look at how // the individual functions are implemented. Because this is wonderfully -// suitable as a template for your own functions. On the other hand, -// these standard functions are part of the basic equipment of Zig. +// suitable as a template for your own functions. In addition these +// standard functions are part of the basic configuration of Zig. // // This means that they are always available on every system. // Therefore it is worthwhile to deal with them also in Ziglings. From 55b2ac4c5f0da387da1844f8f0ca1efdc16c8a80 Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Fri, 16 Feb 2024 15:19:10 +0100 Subject: [PATCH 3/3] Zig version adjusted. --- README.md | 3 ++- build.zig | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7f648e4..ba7ffa8 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,8 @@ that if you update one, you may need to also update the other. ### Version Changes -Version-0.12.0-dev.2043 +Version-0.12.0-dev.2618 +* *2024-02-05* zig 0.12.0-dev.2618 - changes in `build system` - from `Step.zig_exe` to `Step.graph.zig_exe` - see[#18778](https://github.com/ziglang/zig/issues/18778) * *2024-01-05* zig 0.12.0-dev.2043 - rename of `std.Build.FileSource` to `std.Build.LazyPath` - see[#16353](https://github.com/ziglang/zig/issues/16353) * *2023-10-24* zig 0.12.0-dev.1243 - changes in `std.ChildProcess`: renamed exec to run - see[#5853](https://github.com/ziglang/zig/issues/5853) * *2023-06-26* zig 0.11.0-dev.4246 - changes in compile step (now it can be null) diff --git a/build.zig b/build.zig index 779b9e4..71ea66f 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.2043"; + const required_zig = "0.12.0-dev.2618"; const current_zig = builtin.zig_version; const min_zig = std.SemanticVersion.parse(required_zig) catch unreachable; if (current_zig.order(min_zig) == .lt) {