mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-16 09:48:10 +00:00
Only allow one proc-macro process
This commit is contained in:
parent
379b677559
commit
4adf13e2ef
1 changed files with 16 additions and 14 deletions
|
@ -269,20 +269,22 @@ impl GlobalState {
|
|||
let project_folders =
|
||||
ProjectFolders::new(&workspaces, &files_config.exclude, workspace_build_data.as_ref());
|
||||
|
||||
self.proc_macro_client = match self.config.proc_macro_srv() {
|
||||
None => None,
|
||||
Some((path, args)) => match ProcMacroClient::extern_process(path.clone(), args) {
|
||||
Ok(it) => Some(it),
|
||||
Err(err) => {
|
||||
log::error!(
|
||||
"Failed to run proc_macro_srv from path {}, error: {:?}",
|
||||
path.display(),
|
||||
err
|
||||
);
|
||||
None
|
||||
}
|
||||
},
|
||||
};
|
||||
if self.proc_macro_client.is_none() {
|
||||
self.proc_macro_client = match self.config.proc_macro_srv() {
|
||||
None => None,
|
||||
Some((path, args)) => match ProcMacroClient::extern_process(path.clone(), args) {
|
||||
Ok(it) => Some(it),
|
||||
Err(err) => {
|
||||
log::error!(
|
||||
"Failed to run proc_macro_srv from path {}, error: {:?}",
|
||||
path.display(),
|
||||
err
|
||||
);
|
||||
None
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
let watch = match files_config.watcher {
|
||||
FilesWatcher::Client => vec![],
|
||||
|
|
Loading…
Reference in a new issue