summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorChris Boesch <chrboesch@noreply.codeberg.org>2024-08-04 12:31:21 +0000
committerChris Boesch <chrboesch@noreply.codeberg.org>2024-08-04 12:31:21 +0000
commitd6887f21c8469f9d06d326b3b678b01d79a8de64 (patch)
tree65c5d7f87b7f8d1a2a804a957f083231579f9020 /build.zig
parent28320b169f0db67e9a6f91a9dbba66fbfe67a8fe (diff)
parenta671def2cf4e5161f664581dea631e8541e3feea (diff)
Merge pull request 'Fix #127 and #129 by updating the build files to account for recent 0.14.0-dev updates' (#130) from bsubei/exercises:fix-0.14.0-build-changes into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/130
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/build.zig b/build.zig
index b40f8bd..8c7ab7b 100644
--- a/build.zig
+++ b/build.zig
@@ -274,7 +274,7 @@ const ZiglingStep = struct {
return self;
}
- fn make(step: *Step, prog_node: std.Progress.Node) !void {
+ fn make(step: *Step, options: Step.MakeOptions) !void {
// NOTE: Using exit code 2 will prevent the Zig compiler to print the message:
// "error: the following build command failed with exit code 1:..."
const self: *ZiglingStep = @alignCast(@fieldParentPtr("step", step));
@@ -285,7 +285,7 @@ const ZiglingStep = struct {
return;
}
- const exe_path = self.compile(prog_node) catch {
+ const exe_path = self.compile(options.progress_node) catch {
self.printErrors();
if (self.exercise.hint) |hint|
@@ -295,7 +295,7 @@ const ZiglingStep = struct {
std.process.exit(2);
};
- self.run(exe_path.?, prog_node) catch {
+ self.run(exe_path.?, options.progress_node) catch {
self.printErrors();
if (self.exercise.hint) |hint|
@@ -436,7 +436,7 @@ const ZiglingStep = struct {
zig_args.append("--listen=-") catch @panic("OOM");
- return try self.step.evalZigProcess(zig_args.items, prog_node);
+ return try self.step.evalZigProcess(zig_args.items, prog_node, false);
}
fn help(self: *ZiglingStep) void {
@@ -525,7 +525,7 @@ const PrintStep = struct {
return self;
}
- fn make(step: *Step, _: std.Progress.Node) !void {
+ fn make(step: *Step, _: Step.MakeOptions) !void {
const self: *PrintStep = @alignCast(@fieldParentPtr("step", step));
print("{s}", .{self.message});
}