| ... | ... | @@ -728,10 +728,15 @@ fn printStepFailure( |
| 728 | 728 | try ttyconf.setColor(stderr, .reset); |
| 729 | 729 | } |
| 730 | 730 | try stderr.writeAll("\n"); |
| 731 | | } else { |
| 731 | } else if (s.result_error_msgs.items.len > 0) { |
| 732 | 732 | try ttyconf.setColor(stderr, .red); |
| 733 | 733 | try stderr.writeAll(" failure\n"); |
| 734 | 734 | try ttyconf.setColor(stderr, .reset); |
| 735 | } else { |
| 736 | assert(s.result_stderr.len > 0); |
| 737 | try ttyconf.setColor(stderr, .red); |
| 738 | try stderr.writeAll(" stderr\n"); |
| 739 | try ttyconf.setColor(stderr, .reset); |
| 735 | 740 | } |
| 736 | 741 | } |
| 737 | 742 | |
| ... | ... | @@ -918,8 +923,9 @@ fn workerMakeOneStep( |
| 918 | 923 | const show_compile_errors = !run.prominent_compile_errors and |
| 919 | 924 | s.result_error_bundle.errorMessageCount() > 0; |
| 920 | 925 | const show_error_msgs = s.result_error_msgs.items.len > 0; |
| 926 | const show_stderr = s.result_stderr.len > 0; |
| 921 | 927 | |
| 922 | | if (show_error_msgs or show_compile_errors) { |
| 928 | if (show_error_msgs or show_compile_errors or show_stderr) { |
| 923 | 929 | sub_prog_node.context.lock_stderr(); |
| 924 | 930 | defer sub_prog_node.context.unlock_stderr(); |
| 925 | 931 | |
| ... | ... | @@ -1012,11 +1018,16 @@ fn printErrorMessages(b: *std.Build, failing_step: *Step, run: *const Run) !void |
| 1012 | 1018 | } |
| 1013 | 1019 | try ttyconf.setColor(stderr, .reset); |
| 1014 | 1020 | |
| 1015 | | // Penultimately, the compilation errors. |
| 1021 | if (failing_step.result_stderr.len > 0) { |
| 1022 | try stderr.writeAll(failing_step.result_stderr); |
| 1023 | if (!mem.endsWith(u8, failing_step.result_stderr, "\n")) { |
| 1024 | try stderr.writeAll("\n"); |
| 1025 | } |
| 1026 | } |
| 1027 | |
| 1016 | 1028 | if (!run.prominent_compile_errors and failing_step.result_error_bundle.errorMessageCount() > 0) |
| 1017 | 1029 | try failing_step.result_error_bundle.renderToWriter(renderOptions(ttyconf), stderr.writer()); |
| 1018 | 1030 | |
| 1019 | | // Finally, generic error messages. |
| 1020 | 1031 | for (failing_step.result_error_msgs.items) |msg| { |
| 1021 | 1032 | try ttyconf.setColor(stderr, .red); |
| 1022 | 1033 | try stderr.writeAll("error: "); |