mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-05 08:00:48 +00:00
Don't flycheck while the workspace is being loaded
This commit is contained in:
parent
df9d3db82f
commit
df7f755e3b
3 changed files with 5 additions and 2 deletions
|
@ -72,7 +72,6 @@ impl DiagnosticCollection {
|
||||||
let check_fixes = Arc::make_mut(&mut self.check_fixes);
|
let check_fixes = Arc::make_mut(&mut self.check_fixes);
|
||||||
check_fixes.entry(flycheck_id).or_default().entry(file_id).or_default().extend(fix);
|
check_fixes.entry(flycheck_id).or_default().entry(file_id).or_default().extend(fix);
|
||||||
diagnostics.push(diagnostic);
|
diagnostics.push(diagnostic);
|
||||||
tracing::warn!(?flycheck_id, ?file_id, "add_check_diagnostic changes pushed");
|
|
||||||
self.changes.insert(file_id);
|
self.changes.insert(file_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -192,6 +192,7 @@ impl GlobalState {
|
||||||
if let Some(path) = vfs.file_path(file.file_id).as_path() {
|
if let Some(path) = vfs.file_path(file.file_id).as_path() {
|
||||||
let path = path.to_path_buf();
|
let path = path.to_path_buf();
|
||||||
if reload::should_refresh_for_change(&path, file.change_kind) {
|
if reload::should_refresh_for_change(&path, file.change_kind) {
|
||||||
|
tracing::warn!("fetch-fiel_change");
|
||||||
self.fetch_workspaces_queue
|
self.fetch_workspaces_queue
|
||||||
.request_op(format!("vfs file change: {}", path.display()));
|
.request_op(format!("vfs file change: {}", path.display()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -447,7 +447,10 @@ impl GlobalState {
|
||||||
let memdocs_added_or_removed = self.mem_docs.take_changes();
|
let memdocs_added_or_removed = self.mem_docs.take_changes();
|
||||||
|
|
||||||
if self.is_quiescent() {
|
if self.is_quiescent() {
|
||||||
if !was_quiescent {
|
if !was_quiescent
|
||||||
|
&& !self.fetch_workspaces_queue.op_requested()
|
||||||
|
&& !self.fetch_build_data_queue.op_requested()
|
||||||
|
{
|
||||||
for flycheck in &self.flycheck {
|
for flycheck in &self.flycheck {
|
||||||
flycheck.update();
|
flycheck.update();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue