rust-analyzer: overrideCommand with a relative path (`./miri`/`./x.py`) does not work very well, and that is very hard to debug
I am using the following workspace settings for working on Miri with vscode:
// Place your settings in this file to overwrite default and user settings.
{
"rust-analyzer.rustfmt.extraArgs": [
"+nightly"
],
"rust-analyzer.checkOnSave.overrideCommand": [
"./miri",
"check",
"--message-format=json",
],
"rust-analyzer.linkedProjects": [
"./Cargo.toml",
"./cargo-miri/Cargo.toml"
],
//"rust-analyzer.rustcSource": "discover"
}
Whenever I save a file, an error pops up saying
cargo check failed: No such file or directory (os error 2)
That’s all it says. I have no idea which file it is talking about, or what is even going wrong – the cargo check seems to be working fine, I am getting the errors I am expected highlighted as they should. The only sign that anything going wrong is this error message, and the error is not giving any details that would be helpful in determining what is happening.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 21 (21 by maintainers)
Commits related to this issue
- Auto merge of #1924 - RalfJung:ra, r=oli-obk hack to work around RA quirk This is a gross hack to work around https://github.com/rust-analyzer/rust-analyzer/issues/10793: calling `cargo-miri/miri` d... — committed to rust-lang/miri by bors 3 years ago
- Merge #10875 10875: minor: Don't discard flycheck error messages r=Veykril a=Veykril cc #10793 bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com> — committed to rust-lang/rust-analyzer by bors[bot] 3 years ago
- Auto merge of #13065 - RalfJung:override-command-docs, r=Veykril document interaction of checkOnSave.overrideCommand and multiple linked projects Cc https://github.com/rust-lang/rust-analyzer/issues... — committed to rust-lang/rust-analyzer by bors 2 years ago
- Auto merge of #13128 - Veykril:invocation-strategy, r=Veykril Implement invocation strategy config Fixes https://github.com/rust-lang/rust-analyzer/issues/10793 This allows to change how we run bui... — committed to rust-lang/rust-analyzer by bors 2 years ago
- Auto merge of #13128 - Veykril:invocation-strategy, r=Veykril Implement invocation strategy config Fixes https://github.com/rust-lang/rust-analyzer/issues/10793 This allows to change how we run bui... — committed to rust-lang/rust-analyzer by bors 2 years ago
Also https://github.com/rust-lang/rust-analyzer/issues/8937 is probably related to this
The stderr of cargo is read but never presented to the user: https://github.com/rust-analyzer/rust-analyzer/blob/d1e756e05aab5410f6176fce26bf021453708b9b/crates/flycheck/src/lib.rs#L292