Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/ide-db/src/apply_change.rs1
-rw-r--r--crates/ide-db/src/lib.rs1
-rw-r--r--crates/rust-analyzer/src/reload.rs6
3 files changed, 6 insertions, 2 deletions
diff --git a/crates/ide-db/src/apply_change.rs b/crates/ide-db/src/apply_change.rs
index ea1d9cc491..3b8458980c 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 b1df11bf91..f9b8a502d9 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<usize>) -> 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 f8f2cb0932..9c6edb46f4 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");
}