about summary refs log tree commit diff
path: root/compiler/rustc_feature/src/removed.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-13 09:44:05 +0000
committerbors <bors@rust-lang.org>2024-07-13 09:44:05 +0000
commitc1e3f03e602a7af08049f38ffafa09622f28e1d0 (patch)
treebbfabe161eefab924e1f55401dcda04421f47083 /compiler/rustc_feature/src/removed.rs
parent44fb8575dee0c1f2d454962ae78b09817a0f32b1 (diff)
parent0cce0bb204dd6e4ff06a282b605c9ac416a8dbd0 (diff)
downloadrust-c1e3f03e602a7af08049f38ffafa09622f28e1d0.tar.gz
rust-c1e3f03e602a7af08049f38ffafa09622f28e1d0.zip
Auto merge of #127450 - Kobzol:bootstrap-cmd-refactor-5, r=onur-ozkan
Bootstrap command refactoring: improve debuggability (step 5)

Continuation of https://github.com/rust-lang/rust/pull/127321.

This PR improves the debuggability of command execution, by improving the output logged when a command fails (it now includes the exact location where the command was created and where it was executed), and also by adding a "drop bomb", which will panic if a command was created, but not executed (which is probably a bug).

Here is how the output of a failed command looks like:
```
Command "git" "foo" "[bar]" (failure_mode=Exit, stdout_mode=Capture, stderr_mode=Capture) did not execute successfully.
Expected success, got exit status: 1
Created at: src/core/build_steps/compile.rs:1699:9
Executed at: src/core/build_steps/compile.rs:1699:58

STDOUT ----

STDERR ----
git: 'foo' is not a git command. See 'git --help'.
```

And this is what is printed if you forget to execute a command:
```
thread 'main' panicked at /projects/personal/rust/rust/src/tools/build_helper/src/drop_bomb/mod.rs:42:13:
command constructed at `src/core/build_steps/compile.rs:1699:9` was dropped without being executed: `git`
```

Best reviewed commit by commit.

Tracking issue: https://github.com/rust-lang/rust/issues/126819

r? `@onur-ozkan`
Diffstat (limited to 'compiler/rustc_feature/src/removed.rs')
0 files changed, 0 insertions, 0 deletions