New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do you prevent ziglings from running previously solved exercises? #355
Comments
Just run |
@chrboesch |
Unfortunately it is not easy to implement, since the Zig build file is declarative. |
Advanced usage line 'zig build -Dn=x start' deleted, because of #355
For anyone that wants a more automated solution, you can use this nushell script. You can save it as # Change to the path of your dev zig executable
let zig_path = "~/Downloads/zig-dev/zig"
def main [start: int, end: int] {
print $"Running ziglings exercises from ($start) to ($end)"
let rng = $start..$end;
for i in $rng {
^$zig_path build $"-Dn=($i)"
}
} |
Every time I run
zig build
, the previously solved exercises are all compiled and checked as well as the current one. This was fine at first, but now that I'm on exercise 22, the output is getting quite cluttered and the compile time is becoming noticeable.I had a look at the readme and tried to run
zig build -Dn=22 start
and got the following output:Running
zig build -l
yields:Is there still a way to prevent previously solved exercises from being compiled and checked other than specifying each exercise number manually?
zig version:
0.12.0-dev.152+411462e1c
ziglings version:
1e9124b333310b982236d86e2928bbd44f93634e
os: windows 11
The text was updated successfully, but these errors were encountered: