diff --git a/crates/ide-db/src/apply_change.rs b/crates/ide-db/src/apply_change.rs index ea1d9cc4919..3b8458980c6 100644 --- a/crates/ide-db/src/apply_change.rs +++ b/crates/ide-db/src/apply_change.rs @@ -64,6 +64,7 @@ impl RootDatabase { // SourceDatabase base_db::ParseQuery base_db::CrateGraphQuery + base_db::ProcMacrosQuery // SourceDatabaseExt base_db::FileTextQuery diff --git a/crates/ide-db/src/lib.rs b/crates/ide-db/src/lib.rs index b1df11bf911..f9b8a502d99 100644 --- a/crates/ide-db/src/lib.rs +++ b/crates/ide-db/src/lib.rs @@ -137,6 +137,7 @@ impl RootDatabase { pub fn new(lru_capacity: Option) -> RootDatabase { let mut db = RootDatabase { storage: ManuallyDrop::new(salsa::Storage::default()) }; db.set_crate_graph_with_durability(Default::default(), Durability::HIGH); + db.set_proc_macros_with_durability(Default::default(), Durability::HIGH); db.set_local_roots_with_durability(Default::default(), Durability::HIGH); db.set_library_roots_with_durability(Default::default(), Durability::HIGH); db.set_enable_proc_attr_macros(false); diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs index f8f2cb09322..9c6edb46f41 100644 --- a/crates/rust-analyzer/src/reload.rs +++ b/crates/rust-analyzer/src/reload.rs @@ -445,12 +445,14 @@ impl GlobalState { let mut change = Change::new(); change.set_crate_graph(crate_graph); self.analysis_host.apply_change(change); + self.process_changes(); - if same_workspaces { + if same_workspaces && !self.fetch_workspaces_queue.op_requested() { self.load_proc_macros(proc_macro_paths); } - self.process_changes(); + self.reload_flycheck(); + tracing::info!("did switch workspaces"); }