my ziglings
0

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request 'Update for new zig IO' (#315) from esensar/exercises:fix/zig-0.16-new-io into main

Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/315

Chris Boesch (Nov 1, 2025, 3:33 PM +0100) c45b9cd3 7ad02b08

+10 -6
+4 -4
build.zig
··· 570 570 571 571 // Render compile errors at the bottom of the terminal. 572 572 // TODO: use the same ttyconf from the builder. 573 - const ttyconf: std.Io.tty.Config = if (use_color_escapes) 574 - .escape_codes 573 + const color: std.zig.Color = if (use_color_escapes) 574 + .on 575 575 else 576 - .no_color; 576 + .off; 577 577 if (self.step.result_error_bundle.errorMessageCount() > 0) { 578 - self.step.result_error_bundle.renderToStdErr(.{ .ttyconf = ttyconf }); 578 + self.step.result_error_bundle.renderToStdErr(.{}, color); 579 579 } 580 580 } 581 581 };
+6 -2
test/tests.zig
··· 161 161 ); 162 162 defer stderr_file.close(); 163 163 164 - var stderr = stderr_file.readerStreaming(&.{}); 164 + var threaded: std.Io.Threaded = .init_single_threaded; 165 + const io = threaded.io(); 166 + var stderr = stderr_file.readerStreaming(io, &.{}); 165 167 { 166 168 // Skip the logo. 167 169 const nlines = mem.count(u8, root.logo, "\n"); ··· 213 215 ); 214 216 defer stderr_file.close(); 215 217 216 - var stderr = stderr_file.readerStreaming(&.{}); 218 + var threaded: std.Io.Threaded = .init_single_threaded; 219 + const io = threaded.io(); 220 + var stderr = stderr_file.readerStreaming(io, &.{}); 217 221 for (exercises) |ex| { 218 222 if (ex.number() == 1) { 219 223 // Skip the logo.