Skip to content

Commit df7f755

Browse files
committed
Don't flycheck while the workspace is being loaded
1 parent df9d3db commit df7f755

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

crates/rust-analyzer/src/diagnostics.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ impl DiagnosticCollection {
7272
let check_fixes = Arc::make_mut(&mut self.check_fixes);
7373
check_fixes.entry(flycheck_id).or_default().entry(file_id).or_default().extend(fix);
7474
diagnostics.push(diagnostic);
75-
tracing::warn!(?flycheck_id, ?file_id, "add_check_diagnostic changes pushed");
7675
self.changes.insert(file_id);
7776
}
7877

crates/rust-analyzer/src/global_state.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ impl GlobalState {
192192
if let Some(path) = vfs.file_path(file.file_id).as_path() {
193193
let path = path.to_path_buf();
194194
if reload::should_refresh_for_change(&path, file.change_kind) {
195+
tracing::warn!("fetch-fiel_change");
195196
self.fetch_workspaces_queue
196197
.request_op(format!("vfs file change: {}", path.display()));
197198
}

crates/rust-analyzer/src/main_loop.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,10 @@ impl GlobalState {
447447
let memdocs_added_or_removed = self.mem_docs.take_changes();
448448

449449
if self.is_quiescent() {
450-
if !was_quiescent {
450+
if !was_quiescent
451+
&& !self.fetch_workspaces_queue.op_requested()
452+
&& !self.fetch_build_data_queue.op_requested()
453+
{
451454
for flycheck in &self.flycheck {
452455
flycheck.update();
453456
}

0 commit comments

Comments
 (0)