Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit e5bfd7e

Browse files
committed
it, uh, turns out that we should be spawning for new servers. oops.
1 parent 6a42d7f commit e5bfd7e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

crates/rust-analyzer/src/reload.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,9 @@ impl GlobalState {
296296
let workspaces =
297297
workspaces.iter().filter_map(|res| res.as_ref().ok().cloned()).collect::<Vec<_>>();
298298

299-
// `different_workspaces` is used to spawn a new proc macro server for a newly-added
300-
// rust workspace (most commonly sourced from a `rust-project.json`). While the algorithm
301-
// to find the new workspaces is quadratic, we generally expect that the number of total
299+
// `different_workspaces` is used to determine whether to spawn a a new proc macro server for
300+
// a newly-added rust workspace (most commonly sourced from a `rust-project.json`). While the
301+
// algorithm to find the new workspaces is quadratic, we generally expect that the number of total
302302
// workspaces to remain in the low single digits. the `cloned_workspace` is needed for borrowck
303303
// reasons.
304304
let cloned_workspaces = workspaces.clone();
@@ -387,7 +387,8 @@ impl GlobalState {
387387
if self.proc_macro_clients.is_empty() || !different_workspaces.is_empty() {
388388
if let Some((path, path_manually_set)) = self.config.proc_macro_srv() {
389389
tracing::info!("Spawning proc-macro servers");
390-
self.proc_macro_clients = different_workspaces
390+
self.proc_macro_clients = self
391+
.workspaces
391392
.iter()
392393
.map(|ws| {
393394
let (path, args): (_, &[_]) = if path_manually_set {

0 commit comments

Comments
 (0)