Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #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: * https://github.com/rust-lang/rust-analyzer/pull/12858
bors 2022-07-26
parent e36a20c · parent b1e3daf · commit 1c75284
-rw-r--r--crates/rust-analyzer/src/reload.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs
index 9ae361b034..b9aa13ec5b 100644
--- a/crates/rust-analyzer/src/reload.rs
+++ b/crates/rust-analyzer/src/reload.rs
@@ -303,6 +303,9 @@ impl GlobalState {
let files_config = self.config.files();
let project_folders = ProjectFolders::new(&self.workspaces, &files_config.exclude);
+ let standalone_server_name =
+ format!("rust-analyzer-proc-macro-srv{}", std::env::consts::EXE_SUFFIX);
+
if self.proc_macro_clients.is_empty() {
if let Some((path, args)) = self.config.proc_macro_srv() {
self.proc_macro_clients = self
@@ -316,10 +319,8 @@ impl GlobalState {
tracing::info!("Found a cargo workspace...");
if let Some(sysroot) = sysroot.as_ref() {
tracing::info!("Found a cargo workspace with a sysroot...");
- let server_path = sysroot
- .root()
- .join("libexec")
- .join("rust-analyzer-proc-macro-srv");
+ let server_path =
+ sysroot.root().join("libexec").join(&standalone_server_name);
if std::fs::metadata(&server_path).is_ok() {
tracing::info!(
"And the server exists at {}",