You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, it seems like RA for some reason ignores the compiler/rustc_codegen_cranelift part of the check-on-save command: even when I deliberately introduce an error in, e.g., compiler/rustc_codegen_cranelift/src/constant.rs, RA shows no diagnostic at all. Running the exact command that is given here on the console does show an error. Errors in rustc itself are shown. It's almost as if RA just "forgets" to pass the last argument to x.py. (Yes I did "reload window" after changing my settings.json. I even tried restarting vscode.)
The text was updated successfully, but these errors were encountered:
cg_clif is a separate workspace. You need to point to it's Cargo.toml in the rust-analyzer.linkedProjects array. You may also need to add the root Cargo.toml if you set it.
When I set linkedProjects, I get some really strange errors about "Failed to run cargo metadata". Probably the rustc provided by rustup that is set inside the rustc tree is not working, but that rustc should not even be needed -- and it wasn't needed when I did not set linkedProjects.
Does RA just silently drop all errors that it cannot assign to one of the linkedProjects? Couldn't there be a way for it to report all the errors shown by the check-on-save command?
And the "ignoring errors" is because ./x.py check will print paths relative to the cranelift workspace root, but of course RA thinks they are relative to the rustc repo root (where it invoked ./x.py), so it just cannot figure out which file the error refers to. And RA is not wrong here, as a user I would also expect that, but due to rust-lang/cargo#11007, x.py will print paths relative to different roots depending on what it is currently building.
My rustc workspace
settings.json
looks like this:However, it seems like RA for some reason ignores the
compiler/rustc_codegen_cranelift
part of the check-on-save command: even when I deliberately introduce an error in, e.g.,compiler/rustc_codegen_cranelift/src/constant.rs
, RA shows no diagnostic at all. Running the exact command that is given here on the console does show an error. Errors inrustc
itself are shown. It's almost as if RA just "forgets" to pass the last argument tox.py
. (Yes I did "reload window" after changing my settings.json. I even tried restarting vscode.)The text was updated successfully, but these errors were encountered: