diff options
| author | David Barsky <me@davidbarsky.com> | 2023-03-28 09:56:01 -0400 |
|---|---|---|
| committer | David Barsky <me@davidbarsky.com> | 2023-03-28 09:56:01 -0400 |
| commit | e5bfd7ef0ac992e25716a4bb2646b331a5a31fc4 (patch) | |
| tree | 4bfd94948a515ffaa7646ecf5f00406a75a657e2 | |
| parent | 6a42d7f627958d20587c8a137ed1756465d13b1e (diff) | |
| download | rust-e5bfd7ef0ac992e25716a4bb2646b331a5a31fc4.tar.gz rust-e5bfd7ef0ac992e25716a4bb2646b331a5a31fc4.zip | |
it, uh, turns out that we should be spawning for new servers. oops.
| -rw-r--r-- | crates/rust-analyzer/src/reload.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs index 0c76ac8b925..6bd28498d57 100644 --- a/crates/rust-analyzer/src/reload.rs +++ b/crates/rust-analyzer/src/reload.rs @@ -296,9 +296,9 @@ impl GlobalState { let workspaces = workspaces.iter().filter_map(|res| res.as_ref().ok().cloned()).collect::<Vec<_>>(); - // `different_workspaces` is used to spawn a new proc macro server for a newly-added - // rust workspace (most commonly sourced from a `rust-project.json`). While the algorithm - // to find the new workspaces is quadratic, we generally expect that the number of total + // `different_workspaces` is used to determine whether to spawn a a new proc macro server for + // a newly-added rust workspace (most commonly sourced from a `rust-project.json`). While the + // algorithm to find the new workspaces is quadratic, we generally expect that the number of total // workspaces to remain in the low single digits. the `cloned_workspace` is needed for borrowck // reasons. let cloned_workspaces = workspaces.clone(); @@ -387,7 +387,8 @@ impl GlobalState { if self.proc_macro_clients.is_empty() || !different_workspaces.is_empty() { if let Some((path, path_manually_set)) = self.config.proc_macro_srv() { tracing::info!("Spawning proc-macro servers"); - self.proc_macro_clients = different_workspaces + self.proc_macro_clients = self + .workspaces .iter() .map(|ws| { let (path, args): (_, &[_]) = if path_manually_set { |
