-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust-analyzer doesn't work on bootstrap anymore #101070
Comments
Also see rust-lang/rust-analyzer#10793 -- this is somewhat blocked on RA getting better support for projects that use custom build scripts such as |
yeah, you can set linked-workspaces to have it use both, but then you get a bunch of spurious errors when you open the project |
Blocked on rust-lang/rust-analyzer#13128. |
Build scripts now work properly when |
@Veykril I can't get this working. I have in .vscode/settings.json: "rust-analyzer.checkOnSave.enable": true,
"rust-analyzer.checkOnSave.overrideCommand": [
"python3",
"x.py",
"check",
"--json-output"
],
"rust-analyzer.rustfmt.overrideCommand": [
"./build/x86_64-unknown-linux-gnu/stage0/bin/rustfmt",
"--edition=2021"
],
"rust-analyzer.cargo.buildScripts.enable": true,
"rust-analyzer.cargo.buildScripts.invocationLocation": "root",
"rust-analyzer.cargo.buildScripts.invocationStrategy": "once",
"rust-analyzer.cargo.buildScripts.overrideCommand": [
"python3",
"x.py",
"check",
"--json-output"
],
"rust-analyzer.rustc.source": "./Cargo.toml",
"rust-analyzer.cargo.sysroot": "./build/x86_64-unknown-linux-gnu/stage0-sysroot",
"rust-analyzer.procMacro.enable": true,
"rust-analyzer.linkedProjects": ["Cargo.toml", "src/bootstrap/Cargo.toml"], which fails to find x.py:
If I disable |
You'll need to set "rust-analyzer.cargo.checkOnSave.invocationLocation": "root",
"rust-analyzer.cargo.checkOnSave.invocationStrategy": "once", The reason I didn't add those to the dev guide is that you won't get diagnostics for linked projects anyways until |
I think we should add them anyway - even if the diagnostics are missing, having go-to-definition available is still extremely useful. |
Mentoring instructions: add |
Happy to help add this to the dev-guide but I noticed that the |
@rustbot claim |
Oh, sorry - this was fixed by #107757 |
#97513 took bootstrap out of the cargo workspace, meaning that rust-analyzer can't see it anymore. I haven't yet found a config that makes rust-analyzer see it, short of opening bootstrap in a separate window.
This is annoying since I rust-analyzer particularly useful when working on bootstrap, but at least opening another window works for now.
cc @jyn514
The text was updated successfully, but these errors were encountered: