`rust-project check` cannot emit compile errors, only warnings, when used with system_rust_toolchain
- Dominant language
- Rust
- Stars
- 4.4k
- Forks
- 394
- PR merge metrics
- No merged PRs in 30d
Description
Observed:
```sh
$ rust-project check path/to/file.rs
# (no output)
```
Failure path:
1. A rust library can have an error in it. Imagine `path/to/file.rs` contains a syntax error.
2. `rust-project check path/to/file.rs` executes `prelude//rust/rust-analyzer/check.bxl:check` with some additional command line args including `"-c=rust.failure_filter=true" "-c=rust.incremental=true"`
3. The file is resolved to a bunch of targets that include it using the `owner()` cquery
4. Those targets are built with the diag.json subtarget, e.g. `//path/to:lib[diag.json]`
5. ***The failure_filter machinery is not engaged at all for `system_rust_toolchain`. The legacy config settings from step 2 are not read anywhere.*** The rust rules try to read `toolchain_info.failure_filter` but it is always false because it is never given a value anywhere, you can't even set it manually on `system_rust_toolchain`.
6. Those builds fail because of the syntax error in file.rs
7. No artifacts are found for those builds because the builds weren't prevented from failing
9. The bxl can't see the diag.json artifacts
10. Empty output.
Is the solution to create create `config_setting`s for these and use them for the `system_rust_toolchain` defaults?
Contributor guide
Assessment
This issue has not been assessed yet.