Currently addExecutable is called 3 times, unnecessarily making the code
more complex.
The method takes as argument the path to the exercises directory.
Additionally, use the new std.Build.ExecutableOptions.link_libc field.
The new field was added in ziglang/zig@adc9b77d5f on 2023-04-13.
Update the required Zig compiler version.
Note that I added the **current** zig version to the changelog, since
the reason for the change is known only to the person updating the
version.
Currently, the code for defining the path to the exercises directory is
duplicate 4 times.
Add the constants `healed_path` and `work_path`, and use work_path
instead of the duplicated if expression. Update ZiglingStep to take
`work_path` instead of `use_healed` as argument.
Reduce code length by using `join` instead of `std.fs.path.join` and
replace the use of a slice with a tuple.
Additionally, in case of an error from the `join` function, use @panic
instead of unreachable.
Document why the special branch, when the exercises are healed by the
eowyn script, has been disabled.
The POSIX standard says that the patch command should not use stdout,
but GNU patch writes the message:
patching file patches/healed/xxx.zig (read from exercises/xxx.zig).
Add the -s flag to suppress these messages.
Note that the heal function from test/tests.zig is called when running
`zig build -Dhealed` because it is executed in the configure phase.
The deadlock was caused by setting stdout behavior to ignore, when
spawning the patch command. When the patch command writes to devnull it
causes some errors and a deadlock.
The cause of the bug is probably Zig using `\Device\Null` from `ntdll`
while git-bash uses `NUL` from `kernel32`.
Restore the job matrix to run on linux, macos and windows.
Remove lines with extra whitespace.
Improve the documentation of the Eowyn workflow.
Remove the single quoting of the workflow names.
I think it's a bit clearer to show exactly what the syntax sugar of methods is, because that's all it is. Every function in Zig is in a struct (files are structs after all) and methods just simplify their use.
I also thought we might use the explicit saturating subtraction as that is why the feature is in Zig.