From 26fc4fdaaa4501db81e22a47b111f2c289c7e13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Sat, 1 Nov 2025 10:34:18 +0100 Subject: [PATCH] Update for new zig IO `test/tests.zig` fails after https://github.com/ziglang/zig/pull/25592 was merged in. This just ensures that Io is passed, it might not be the ideal solution. `build.zig` was also failing due to new color parameter. --- build.zig | 8 ++++---- test/tests.zig | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/build.zig b/build.zig index 9a65013..2a16899 100644 --- a/build.zig +++ b/build.zig @@ -570,12 +570,12 @@ const ZiglingStep = struct { // Render compile errors at the bottom of the terminal. // TODO: use the same ttyconf from the builder. - const ttyconf: std.Io.tty.Config = if (use_color_escapes) - .escape_codes + const color: std.zig.Color = if (use_color_escapes) + .on else - .no_color; + .off; if (self.step.result_error_bundle.errorMessageCount() > 0) { - self.step.result_error_bundle.renderToStdErr(.{ .ttyconf = ttyconf }); + self.step.result_error_bundle.renderToStdErr(.{}, color); } } }; diff --git a/test/tests.zig b/test/tests.zig index b10f203..a242ca6 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -161,7 +161,9 @@ const CheckNamedStep = struct { ); defer stderr_file.close(); - var stderr = stderr_file.readerStreaming(&.{}); + var threaded: std.Io.Threaded = .init_single_threaded; + const io = threaded.io(); + var stderr = stderr_file.readerStreaming(io, &.{}); { // Skip the logo. const nlines = mem.count(u8, root.logo, "\n"); @@ -213,7 +215,9 @@ const CheckStep = struct { ); defer stderr_file.close(); - var stderr = stderr_file.readerStreaming(&.{}); + var threaded: std.Io.Threaded = .init_single_threaded; + const io = threaded.io(); + var stderr = stderr_file.readerStreaming(io, &.{}); for (exercises) |ex| { if (ex.number() == 1) { // Skip the logo.