mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
build runner: don't incorrectly omit reference traces
It's incorrect to ever set `include_reference_trace` here, because the compiler has already given or not given reference traces depending on the `-freference-trace` option propagated to the compiler process by `std.Build.Step.Compile`. Perhaps in future we could make the compiler always return the reference trace when communicating over the compiler protocol; that'd be more versatile than the current behavior, because the build runner could, for instance, show a reference trace on-demand without having to even invoke the compiler. That seems really useful, since the reference trace is *often* unnecessary noise, but *sometimes* essential. However, we don't live in that world right now, so passing the option here doesn't make sense. Resolves: #23415
This commit is contained in:
parent
f377ea1060
commit
7218218040
1 changed files with 2 additions and 6 deletions
|
|
@ -740,7 +740,7 @@ fn runStepNames(
|
|||
if (run.prominent_compile_errors and total_compile_errors > 0) {
|
||||
for (step_stack.keys()) |s| {
|
||||
if (s.result_error_bundle.errorMessageCount() > 0) {
|
||||
s.result_error_bundle.renderToStdErr(.{ .ttyconf = ttyconf, .include_reference_trace = (b.reference_trace orelse 0) > 0 });
|
||||
s.result_error_bundle.renderToStdErr(.{ .ttyconf = ttyconf });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1119,11 +1119,7 @@ fn workerMakeOneStep(
|
|||
defer std.debug.unlockStdErr();
|
||||
|
||||
const gpa = b.allocator;
|
||||
const options: std.zig.ErrorBundle.RenderOptions = .{
|
||||
.ttyconf = run.ttyconf,
|
||||
.include_reference_trace = (b.reference_trace orelse 0) > 0,
|
||||
};
|
||||
printErrorMessages(gpa, s, options, run.stderr, run.prominent_compile_errors) catch {};
|
||||
printErrorMessages(gpa, s, .{ .ttyconf = run.ttyconf }, run.stderr, run.prominent_compile_errors) catch {};
|
||||
}
|
||||
|
||||
handle_result: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue