Skip to content

Commit 1c75284

Browse files
committed
Auto merge of rust-lang#12878 - fasterthanlime:standalone-pms-exe, r=lnicola
Find standalone proc-macro-srv on windows too I forgot that executables end with `.exe` on Windows in: * rust-lang/rust-analyzer#12858
2 parents e36a20c + b1e3daf commit 1c75284

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

crates/rust-analyzer/src/reload.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@ impl GlobalState {
303303
let files_config = self.config.files();
304304
let project_folders = ProjectFolders::new(&self.workspaces, &files_config.exclude);
305305

306+
let standalone_server_name =
307+
format!("rust-analyzer-proc-macro-srv{}", std::env::consts::EXE_SUFFIX);
308+
306309
if self.proc_macro_clients.is_empty() {
307310
if let Some((path, args)) = self.config.proc_macro_srv() {
308311
self.proc_macro_clients = self
@@ -316,10 +319,8 @@ impl GlobalState {
316319
tracing::info!("Found a cargo workspace...");
317320
if let Some(sysroot) = sysroot.as_ref() {
318321
tracing::info!("Found a cargo workspace with a sysroot...");
319-
let server_path = sysroot
320-
.root()
321-
.join("libexec")
322-
.join("rust-analyzer-proc-macro-srv");
322+
let server_path =
323+
sysroot.root().join("libexec").join(&standalone_server_name);
323324
if std::fs::metadata(&server_path).is_ok() {
324325
tracing::info!(
325326
"And the server exists at {}",

0 commit comments

Comments
 (0)