Skip to content

Commit

Permalink
Rollup merge of rust-lang#99139 - jyn514:dist-tool-help, r=Mark-Simul…
Browse files Browse the repository at this point in the history
…acrum

Give a better error when `x dist` fails for an optional tool

Before:
```
thread 'main' panicked at 'Unable to build RLS', dist.rs:42:9
```

After:
```
thread 'main' panicked at 'Unable to build submodule tool RLS (use `missing-tools = true` to ignore this failure)
note: not all tools are available on all nightlies
help: see https://forge.rust-lang.org/infra/toolstate.html for more information', dist.rs:43:9
```

Closes rust-lang#85683 by explaining better why the error is expected.
  • Loading branch information
Dylan-DPC authored Jul 14, 2022
2 parents fa8f684 + 9395103 commit 530a59f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ fn missing_tool(tool_name: &str, skip: bool) {
if skip {
println!("Unable to build {}, skipping dist", tool_name)
} else {
panic!("Unable to build {}", tool_name)
let help = "note: not all tools are available on all nightlies\nhelp: see https://forge.rust-lang.org/infra/toolstate.html for more information";
panic!(
"Unable to build submodule tool {} (use `missing-tools = true` to ignore this failure)\n{}",
tool_name, help
)
}
}

Expand Down

0 comments on commit 530a59f

Please sign in to comment.