mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-29 06:23:25 +00:00
minor: Do progress reporting for crate-graph construction
This commit is contained in:
parent
4de0204d58
commit
232125be12
2 changed files with 17 additions and 3 deletions
|
@ -653,7 +653,7 @@ impl GlobalState {
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Some(state) = state {
|
if let Some(state) = state {
|
||||||
self.report_progress("Building", state, msg, None, None);
|
self.report_progress("Building build-artifacts", state, msg, None, None);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Task::LoadProcMacros(progress) => {
|
Task::LoadProcMacros(progress) => {
|
||||||
|
@ -669,7 +669,7 @@ impl GlobalState {
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Some(state) = state {
|
if let Some(state) = state {
|
||||||
self.report_progress("Loading", state, msg, None, None);
|
self.report_progress("Loading proc-macros", state, msg, None, None);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Task::BuildDepsHaveChanged => self.build_deps_changed = true,
|
Task::BuildDepsHaveChanged => self.build_deps_changed = true,
|
||||||
|
@ -861,7 +861,7 @@ impl GlobalState {
|
||||||
let title = if self.flycheck.len() == 1 {
|
let title = if self.flycheck.len() == 1 {
|
||||||
format!("{}", self.config.flycheck())
|
format!("{}", self.config.flycheck())
|
||||||
} else {
|
} else {
|
||||||
format!("cargo check (#{})", id + 1)
|
format!("{} (#{})", self.config.flycheck(), id + 1)
|
||||||
};
|
};
|
||||||
self.report_progress(
|
self.report_progress(
|
||||||
&title,
|
&title,
|
||||||
|
|
|
@ -526,6 +526,13 @@ impl GlobalState {
|
||||||
// crate graph construction relies on these paths, record them so when one of them gets
|
// crate graph construction relies on these paths, record them so when one of them gets
|
||||||
// deleted or created we trigger a reconstruction of the crate graph
|
// deleted or created we trigger a reconstruction of the crate graph
|
||||||
let mut crate_graph_file_dependencies = FxHashSet::default();
|
let mut crate_graph_file_dependencies = FxHashSet::default();
|
||||||
|
self.report_progress(
|
||||||
|
"Building CrateGraph",
|
||||||
|
crate::lsp::utils::Progress::Begin,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
);
|
||||||
|
|
||||||
let (crate_graph, proc_macro_paths, layouts, toolchains) = {
|
let (crate_graph, proc_macro_paths, layouts, toolchains) = {
|
||||||
// Create crate graph from all the workspaces
|
// Create crate graph from all the workspaces
|
||||||
|
@ -564,6 +571,13 @@ impl GlobalState {
|
||||||
change.set_toolchains(toolchains);
|
change.set_toolchains(toolchains);
|
||||||
self.analysis_host.apply_change(change);
|
self.analysis_host.apply_change(change);
|
||||||
self.crate_graph_file_dependencies = crate_graph_file_dependencies;
|
self.crate_graph_file_dependencies = crate_graph_file_dependencies;
|
||||||
|
self.report_progress(
|
||||||
|
"Building CrateGraph",
|
||||||
|
crate::lsp::utils::Progress::End,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
);
|
||||||
|
|
||||||
self.process_changes();
|
self.process_changes();
|
||||||
self.reload_flycheck();
|
self.reload_flycheck();
|
||||||
|
|
Loading…
Reference in a new issue