Skip to content

Commit

Permalink
Unrolled build for rust-lang#133712
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#133712 - RalfJung:rust_analyzer_settings, r=jieyouxu

rust_analyzer_settings: force use of 'nightly' toolchain

The cranelift folder contains a rust-toolchain file. That means when RA opens `compiler/rustc_codegen_cranelift/Cargo.toml`, it will try to use that toolchain or fail. (Maybe that toolchain gets auto-installed for others? On my system, it just fails, but I also run vscodium in a sandbox.)

However, it shouldn't be necessary to use more than one toolchain for the rustc workspace. So we can set the `RUSTUP_TOOLCHAIN` variable on the server side to force the same toolchain to be used everywhere.

Suggested by `@ChayimFriedman2` in rust-lang/rust-analyzer#18585.
  • Loading branch information
rust-timer authored Dec 2, 2024
2 parents a522d78 + fd13717 commit 2be8730
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/bootstrap/src/core/build_steps/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ Select which editor you would like to set up [default: None]: ";
"828666b021d837a33e78d870b56d34c88a5e2c85de58b693607ec574f0c27000",
"811fb3b063c739d261fd8590dd30242e117908f5a095d594fa04585daa18ec4d",
"4eecb58a2168b252077369da446c30ed0e658301efe69691979d1ef0443928f4",
"c394386e6133bbf29ffd32c8af0bb3d4aac354cba9ee051f29612aa9350f8f8d",
],
EditorKind::Emacs => vec![
"51068d4747a13732440d1a8b8f432603badb1864fa431d83d0fd4f8fa57039e0",
Expand Down
3 changes: 3 additions & 0 deletions src/etc/rust_analyzer_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@
"rust-analyzer.rustc.source": "./Cargo.toml",
"rust-analyzer.cargo.extraEnv": {
"RUSTC_BOOTSTRAP": "1"
},
"rust-analyzer.server.extraEnv": {
"RUSTUP_TOOLCHAIN": "nightly"
}
}

0 comments on commit 2be8730

Please sign in to comment.