diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2026-03-20 19:13:22 +0100 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2026-03-20 19:13:22 +0100 |
| commit | 9f6092aea64647c50333f7690542dab56f1472ac (patch) | |
| tree | 60025c24562ed6fb0b0c15f0fc33bad5a2bbe4c9 | |
| parent | 04f4c1e32c21b9723f43184e63f4040349cdddf2 (diff) | |
| parent | 95ad73013ada66c63652716fb83ab943e8da8b6c (diff) | |
Merge branch 'main' into main
| -rw-r--r-- | build.zig | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -72,6 +72,9 @@ pub const Exercise = struct { /// This exercise is not supported by the current Zig compiler. skip: bool = false, + /// Hint to the user, why this has been skipped + skip_hint: ?[]const u8 = null, + /// Returns the name of the main file with .zig stripped. pub fn name(self: Exercise) []const u8 { return std.fs.path.stem(self.main_file); @@ -347,8 +350,12 @@ const ZiglingStep = struct { const self: *ZiglingStep = @alignCast(@fieldParentPtr("step", step)); if (self.exercise.skip) { - print("Skipping {s}\n\n", .{self.exercise.main_file}); + print("Skipping {s}", .{self.exercise.main_file}); + + if (self.exercise.skip_hint) |hint| + print("\n{s}Reason: {s}{s}\n", .{ bold_text, hint, reset_text }); + print( "\n\n", .{}); return; } @@ -1038,7 +1045,8 @@ const exercises = [_]Exercise{ .{ .main_file = "074_comptime9.zig", .output = "My llama value is 2.", - .skip = true, + .skip = false, + .skip_hint = "This is actually correct as it is. :-)" }, .{ .main_file = "075_quiz8.zig", @@ -1089,41 +1097,49 @@ const exercises = [_]Exercise{ .output = "foo() A", .hint = "Read the facts. Use the facts.", .skip = true, + .skip_hint = "async has not been implemented in the current compiler version.", }, .{ .main_file = "085_async2.zig", .output = "Hello async!", .skip = true, + .skip_hint = "async has not been implemented in the current compiler version.", }, .{ .main_file = "086_async3.zig", .output = "5 4 3 2 1", .skip = true, + .skip_hint = "async has not been implemented in the current compiler version.", }, .{ .main_file = "087_async4.zig", .output = "1 2 3 4 5", .skip = true, + .skip_hint = "async has not been implemented in the current compiler version.", }, .{ .main_file = "088_async5.zig", .output = "Example Title.", .skip = true, + .skip_hint = "async has not been implemented in the current compiler version.", }, .{ .main_file = "089_async6.zig", .output = ".com: Example Title, .org: Example Title.", .skip = true, + .skip_hint = "async has not been implemented in the current compiler version.", }, .{ .main_file = "090_async7.zig", .output = "beef? BEEF!", .skip = true, + .skip_hint = "async has not been implemented in the current compiler version.", }, .{ .main_file = "091_async8.zig", .output = "ABCDEF", .skip = true, + .skip_hint = "async has not been implemented in the current compiler version.", }, .{ |
