Commit c40e03b
committed
"Action failed": highlight the action, not the command
We've found that when reading Buck2 error output, users often focus on
the description of the action that failed ("Local command returned
non-zero exit code 1"), which is the first part of the error message
that's rendered in red text. Instead, we would like users to look at the
name of the action that failed, which is rendered in bold text and often
evades notice.
- At the end of a failing Buck2 command, there's a section which recaps
the errors encountered ("BUILD FAILED" "Failed to build
'root//src/Model:Model ...'"). This message is very legible and shows
the failing target clearly, but users don't always see this message at
first. The command may be long-running and the user may be reading
output before it has finished, or the user may simply be reading the
output top-to-bottom.
- The description of the action that failed (currently rendered in red
text) contains supplementary debugging information such as the failing
command's exit code. It also prints the failing command (truncated),
which is somewhat misleading; because Buck2 rules often invoke builds
through layers of wrapper scripts, the failing command is rarely
informative (e.g. a `ghc` failure does not show `ghc`, any wrapper
script filename, or any source filenames in the truncated command).
Although truncating the command is a good tradeoff for brevity, it is
not the most informative part of the error message.
Therefore, this change makes small adjustments to the styling of action
errors:
- The "Action failed" headline is rendered in bold red text, rather than
bold white text. This helps draw the user's attention to the name of
the action that failed, rather than the command that failed. This is
the most important part of the change.
- The reason ("Local command returned non-zero exit code 1") is still
rendered in dark red text, as it provides context for _how_ the action
failed.
- The "Reproduce locally" line is rendered in white text, rather than
dark red text.1 parent 2555a25 commit c40e03b
1 file changed
+10
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
| 626 | + | |
626 | 627 | | |
627 | 628 | | |
628 | 629 | | |
| |||
902 | 903 | | |
903 | 904 | | |
904 | 905 | | |
905 | | - | |
906 | | - | |
907 | | - | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
908 | 909 | | |
909 | 910 | | |
910 | 911 | | |
| |||
937 | 938 | | |
938 | 939 | | |
939 | 940 | | |
940 | | - | |
941 | | - | |
942 | | - | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
943 | 944 | | |
944 | 945 | | |
945 | 946 | | |
| |||
955 | 956 | | |
956 | 957 | | |
957 | 958 | | |
958 | | - | |
959 | | - | |
960 | | - | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
961 | 962 | | |
962 | 963 | | |
963 | 964 | | |
| |||
0 commit comments