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
This commit is contained in:
Chris Boesch 2024-01-05 13:52:09 +00:00
commit 0d46acfa02
3 changed files with 9 additions and 8 deletions

View file

@ -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

View file

@ -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) {

View file

@ -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.* = .{