Closed
Description
I was talking to @jyn514 about what config to use to work on src/bootstrap
and we couldn't figure out why it doesn't work for me.
We tried this config:
{
"rust-analyzer.checkOnSave.overrideCommand": [
"x",
"check",
"--json-output",
"--build-dir",
"build-rust-analyzer"
],
"rust-analyzer.rustfmt.overrideCommand": [
"./build/x86_64-unknown-linux-gnu/stage0/bin/rustfmt",
"--edition=2021"
],
"rust-analyzer.procMacro.server": "./build/x86_64-unknown-linux-gnu/stage0/libexec/rust-analyzer-proc-macro-srv",
"rust-analyzer.procMacro.enable": true,
"rust-analyzer.cargo.buildScripts.enable": true,
"rust-analyzer.cargo.buildScripts.invocationLocation": "root",
"rust-analyzer.cargo.buildScripts.invocationStrategy": "once",
"rust-analyzer.cargo.buildScripts.overrideCommand": [
"x",
"check",
"--json-output",
],
"rust-analyzer.cargo.sysroot": "./build/x86_64-unknown-linux-gnu/stage0-sysroot",
"rust-analyzer.rustc.source": "./Cargo.toml",
"rust-analyzer.linkedProjects": ["Cargo.toml", "src/bootstrap/Cargo.toml"],
}
This config works for working on bootstrap but breaks when I work on the compiler:
[ERROR rust_analyzer::main_loop] flycheck 1: File with cargo diagnostic not found in VFS: file not found: /home/nilsh/projects/rust/src/bootstrap/compiler/rustc_builtin_macros/src/format.rs
Metadata
Metadata
Assignees
Labels
No labels