summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorprasefia <prasefia@tuta.io>2026-01-06 02:55:10 +0300
committerprasefia <prasefia@tuta.io>2026-01-06 02:55:10 +0300
commita04f945d3693938fc663e45b59397b586f8592f0 (patch)
treec457ecaea36d2d6b5085d0bd40ed3f3355abcd50 /build.zig
parent62122973358122463823b87f6c9c5ac47d449a08 (diff)
fix build errors in new Zig compiler
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/build.zig b/build.zig
index 1b27264..4bbf9a0 100644
--- a/build.zig
+++ b/build.zig
@@ -5,7 +5,7 @@ const tests = @import("test/tests.zig");
const Build = std.Build;
const CompileStep = Build.CompileStep;
const Step = Build.Step;
-const Child = std.process.Child;
+const Process = std.process;
const assert = std.debug.assert;
const join = std.fs.path.join;
@@ -395,7 +395,7 @@ const ZiglingStep = struct {
// Allow up to 1 MB of stdout capture.
const max_output_bytes = 1 * 1024 * 1024;
- const result = Child.run(b.allocator, io, .{
+ const result = Process.run(b.allocator, io, .{
.argv = &.{exe_path},
.cwd = b.build_root.path.?,
.cwd_dir = b.build_root.handle,
@@ -412,13 +412,13 @@ const ZiglingStep = struct {
}
}
- fn check_output(self: *ZiglingStep, result: Child.RunResult) !void {
+ fn check_output(self: *ZiglingStep, result: Process.RunResult) !void {
const b = self.step.owner;
const io = b.graph.io;
// Make sure it exited cleanly.
switch (result.term) {
- .Exited => |code| {
+ .exited => |code| {
if (code != 0) {
return self.step.fail("{s} exited with error code {d} (expected {})", .{
self.exercise.main_file, code, 0,
@@ -475,9 +475,9 @@ const ZiglingStep = struct {
print("{s}PASSED:\n{s}{s}\n\n", .{ green_text, output, reset_text });
}
- fn check_test(self: *ZiglingStep, result: Child.RunResult) !void {
+ fn check_test(self: *ZiglingStep, result: Process.RunResult) !void {
switch (result.term) {
- .Exited => |code| {
+ .exited => |code| {
if (code != 0) {
// The test failed.
const stderr = std.mem.trimEnd(u8, result.stderr, " \r\n");