Link to comment describing the enhancement which should be made: #31077 (comment)
Original issue text is below.
Zig Version
0.16.0-dev.2349+204fa8959
Steps to Reproduce and Observed Behavior
I am learning Zig, so apologies if I missed something obvious.
test.zig:
const std = @import("std");
test "crash reproduction" {
std.debug.print("This output to stderr might cause a crash.\n", .{});
}
When running zig build test I get:
test
└─ run test w
This output to stderr might cause a crash.
failed command: ./.zig-cache/o/24e009cdb31905b1832151517d512a8e/test --cache-dir=./.zig-cache --seed=0x7ca33b43 --listen=-
If I remove the debug statement the problem disappears. I tested with Zig 0.15.2, and it doesn't have this problem.
Note that std.debug.print only outputs to stderr, not stdout (I verified with shell redirection), so this isn't a duplicate of the known issue with stdout: https://github.com/ziglang/zig/issues/15091
Expected Behavior
- No "failed command" warning.
- No output when running 'zig build test' (because no failing test). [EDIT: ignore this part, I understand that it is not how it is supposed to work]
Link to comment describing the enhancement which should be made: https://codeberg.org/ziglang/zig/issues/31077#issuecomment-10291088
Original issue text is below.
---
### Zig Version
0.16.0-dev.2349+204fa8959
### Steps to Reproduce and Observed Behavior
I am learning Zig, so apologies if I missed something obvious.
test.zig:
```
const std = @import("std");
test "crash reproduction" {
std.debug.print("This output to stderr might cause a crash.\n", .{});
}
```
When running zig build test I get:
```
test
└─ run test w
This output to stderr might cause a crash.
failed command: ./.zig-cache/o/24e009cdb31905b1832151517d512a8e/test --cache-dir=./.zig-cache --seed=0x7ca33b43 --listen=-
```
If I remove the debug statement the problem disappears. I tested with Zig 0.15.2, and it doesn't have this problem.
Note that std.debug.print only outputs to stderr, not stdout (I verified with shell redirection), so this isn't a duplicate of the known issue with stdout: https://github.com/ziglang/zig/issues/15091
### Expected Behavior
- No "failed command" warning.
- No output when running 'zig build test' (because no failing test). [EDIT: ignore this part, I understand that it is not how it is supposed to work]