prepare for a new breaking change in Zig
Today was merged commit ziglang/zig@13eb7251d.
This will break build.zig and test/tests.zig.
I will write a fix, so that when the Github Actions fail I will push it.
Never mind: the API change is isolated to `std.Build.
BTW, I want to write an exercise about testing in Zig. That means I need a new flag run_test to activate a test step. Do you have an idea for realizing?
BTW, I want to write an exercise about testing in Zig. That means I need a new flag
run_testto activate a test step. Do you have an idea for realizing?
You can add a type:
pub const Kind = enum {
exe,
lib,
obj,
@"test",
};
This is defined in std.Build.CompileStep. lib obj are currently not necessary.
Then you can add a new Exercise.kind field with default value set to .exe.
If it is not urgent, I can help writing the code in build.zig in a PR.
I suggest opening a new issue and creating a custom branch in github.com/ratfactor/ziglings if you decide to write the code yourself.
You can add a new ZiglingStep.run_test method, for running the zig test command.
If it is not urgent
No, it's not.
can help writing the code in build.zig in a PR.
Sounds great.
I suggest opening a new issue and creating a custom branch
I will do that.
In commit ziglang/zig@3f3b1a680, std.Build.XyzStep have been deprecated for `std.Build.Step.Xyz.
In future, this will be a real incompatible API change, but it will probably take a long time (see the still existing std.Build.Builder).
Thanks for the information. Well, there is a lot of work in the future to keep Ziglings alive. :sweat_smile:
I can help writing the code in build.zig in a PR.
BTW, did you see my PR for expanding the build system? I did not want to link it here.
Update: Now you have reopened this issue, then I also can link the PR here: https://github.com/ratfactor/ziglings/pull/278
I did not see your PR.
I solved the problem by watching all activity on ziglings.