mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-14 17:07:26 +00:00
Set proc_macros input when creating the RootDatabase
This commit is contained in:
parent
607375dc20
commit
e5f24a6d7c
3 changed files with 6 additions and 2 deletions
|
@ -64,6 +64,7 @@ impl RootDatabase {
|
|||
// SourceDatabase
|
||||
base_db::ParseQuery
|
||||
base_db::CrateGraphQuery
|
||||
base_db::ProcMacrosQuery
|
||||
|
||||
// SourceDatabaseExt
|
||||
base_db::FileTextQuery
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue