diff options
author | Edwin Cheng <[email protected]> | 2021-02-01 20:55:17 +0000 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2021-02-01 20:55:17 +0000 |
commit | 4adf13e2efa396bfeab553b7243b6a3bcd57db07 (patch) | |
tree | f0be5628959a155ad215038e06392748fdb445a9 /crates | |
parent | 379b6775598659f66aa8b438cdb3d19aa322a2f4 (diff) |
Only allow one proc-macro process
Diffstat (limited to 'crates')
-rw-r--r-- | crates/rust-analyzer/src/reload.rs | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs index 031a0cef4..c4f1d098b 100644 --- a/crates/rust-analyzer/src/reload.rs +++ b/crates/rust-analyzer/src/reload.rs | |||
@@ -269,20 +269,22 @@ impl GlobalState { | |||
269 | let project_folders = | 269 | let project_folders = |
270 | ProjectFolders::new(&workspaces, &files_config.exclude, workspace_build_data.as_ref()); | 270 | ProjectFolders::new(&workspaces, &files_config.exclude, workspace_build_data.as_ref()); |
271 | 271 | ||
272 | self.proc_macro_client = match self.config.proc_macro_srv() { | 272 | if self.proc_macro_client.is_none() { |
273 | None => None, | 273 | self.proc_macro_client = match self.config.proc_macro_srv() { |
274 | Some((path, args)) => match ProcMacroClient::extern_process(path.clone(), args) { | 274 | None => None, |
275 | Ok(it) => Some(it), | 275 | Some((path, args)) => match ProcMacroClient::extern_process(path.clone(), args) { |
276 | Err(err) => { | 276 | Ok(it) => Some(it), |
277 | log::error!( | 277 | Err(err) => { |
278 | "Failed to run proc_macro_srv from path {}, error: {:?}", | 278 | log::error!( |
279 | path.display(), | 279 | "Failed to run proc_macro_srv from path {}, error: {:?}", |
280 | err | 280 | path.display(), |
281 | ); | 281 | err |
282 | None | 282 | ); |
283 | } | 283 | None |
284 | }, | 284 | } |
285 | }; | 285 | }, |
286 | }; | ||
287 | } | ||
286 | 288 | ||
287 | let watch = match files_config.watcher { | 289 | let watch = match files_config.watcher { |
288 | FilesWatcher::Client => vec![], | 290 | FilesWatcher::Client => vec![], |