diff options
author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2024-01-05 13:52:09 +0000 |
---|---|---|
committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2024-01-05 13:52:09 +0000 |
commit | 0d46acfa02d0c29fdfb3651e82a77284dd8f2e00 (patch) | |
tree | 4e23f229df4583b0ea16315cb37140d694ac5e17 | |
parent | b7dfa4cd1df06536921600be34c6ea40e2780691 (diff) | |
parent | 15de3785a36c2e4f06fe573d761a69ed306f5fea (diff) |
Merge pull request 'Zig 0.12.0-dev.2043 compatability changes for test runner' (#35) from drglove/exercises:zig-2043-changes into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/35
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | build.zig | 2 | ||||
-rw-r--r-- | test/tests.zig | 12 |
3 files changed, 9 insertions, 8 deletions
@@ -96,7 +96,8 @@ that if you update one, you may need to also update the other. ### Version Changes -Version-0.12.0-dev.1243 +Version-0.12.0-dev.2043 +* *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) * *2023-06-26* zig 0.11.0-dev.3853 - removal of destination type from all cast builtins @@ -15,7 +15,7 @@ const print = std.debug.print; // 1) Getting Started // 2) Version Changes comptime { - const required_zig = "0.12.0-dev.1243"; + const required_zig = "0.12.0-dev.2043"; const current_zig = builtin.zig_version; const min_zig = std.SemanticVersion.parse(required_zig) catch unreachable; if (current_zig.order(min_zig) == .lt) { diff --git a/test/tests.zig b/test/tests.zig index 45c075c..0a19277 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -8,8 +8,8 @@ const mem = std.mem; const Allocator = std.mem.Allocator; const Child = std.process.Child; -const Build = std.build; -const FileSource = std.Build.FileSource; +const Build = std.Build; +const LazyPath = std.Build.LazyPath; const Reader = fs.File.Reader; const RunStep = std.Build.RunStep; const Step = Build.Step; @@ -132,9 +132,9 @@ fn createCase(b: *Build, name: []const u8) *Step { const CheckNamedStep = struct { step: Step, exercise: Exercise, - stderr: FileSource, + stderr: LazyPath, - pub fn create(owner: *Build, exercise: Exercise, stderr: FileSource) *CheckNamedStep { + pub fn create(owner: *Build, exercise: Exercise, stderr: LazyPath) *CheckNamedStep { const self = owner.allocator.create(CheckNamedStep) catch @panic("OOM"); self.* = .{ .step = Step.init(.{ @@ -180,12 +180,12 @@ const CheckNamedStep = struct { const CheckStep = struct { step: Step, exercises: []const Exercise, - stderr: FileSource, + stderr: LazyPath, pub fn create( owner: *Build, exercises: []const Exercise, - stderr: FileSource, + stderr: LazyPath, ) *CheckStep { const self = owner.allocator.create(CheckStep) catch @panic("OOM"); self.* = .{ |