about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-15 12:29:34 +0000
committerbors <bors@rust-lang.org>2022-06-15 12:29:34 +0000
commit15c63c4119c090a310020f4b7977f3fccaa02ba5 (patch)
treef7a2a4b3d85a1839541f22a7ad411444f475686a
parent7ca5d165f8862b6fd263c2beca74bb53bf8da37e (diff)
parent664a751f2b5abc3cc0fed5bb21d243e7e5bc31b8 (diff)
downloadrust-15c63c4119c090a310020f4b7977f3fccaa02ba5.tar.gz
rust-15c63c4119c090a310020f4b7977f3fccaa02ba5.zip
Auto merge of #12541 - Veykril:vs-reload, r=Veykril
fix: Clear proc-macro changed flag when reloading workspace
-rw-r--r--crates/rust-analyzer/src/handlers.rs1
-rw-r--r--crates/rust-analyzer/src/reload.rs2
-rw-r--r--editors/code/src/ctx.ts4
3 files changed, 4 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs
index ff61081aa81..69a03850b5c 100644
--- a/crates/rust-analyzer/src/handlers.rs
+++ b/crates/rust-analyzer/src/handlers.rs
@@ -45,6 +45,7 @@ use crate::{
 
 pub(crate) fn handle_workspace_reload(state: &mut GlobalState, _: ()) -> Result<()> {
     state.proc_macro_client = None;
+    state.proc_macro_changed = false;
     state.fetch_workspaces_queue.request_op("reload workspace request".to_string());
     state.fetch_build_data_queue.request_op("reload workspace request".to_string());
     Ok(())
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs
index 81afdd8f7b6..62a446ce2a6 100644
--- a/crates/rust-analyzer/src/reload.rs
+++ b/crates/rust-analyzer/src/reload.rs
@@ -162,7 +162,7 @@ impl GlobalState {
     }
 
     pub(crate) fn fetch_build_data(&mut self, cause: Cause) {
-        tracing::debug!(%cause, "will fetch build data");
+        tracing::info!(%cause, "will fetch build data");
         let workspaces = Arc::clone(&self.workspaces);
         let config = self.config.cargo();
         self.task_pool.handle.spawn_with_sender(move |sender| {
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts
index 51781b4205c..10063470f79 100644
--- a/editors/code/src/ctx.ts
+++ b/editors/code/src/ctx.ts
@@ -77,10 +77,10 @@ export class Ctx {
     }
 
     setServerStatus(status: ServerStatusParams) {
-        this.statusBar.tooltip = status.message ?? "Ready";
         let icon = "";
         switch (status.health) {
             case "ok":
+                this.statusBar.tooltip = status.message ?? "Ready";
                 this.statusBar.command = undefined;
                 this.statusBar.color = undefined;
                 this.statusBar.backgroundColor = undefined;
@@ -105,7 +105,7 @@ export class Ctx {
                 break;
         }
         if (!status.quiescent) icon = "$(sync~spin) ";
-        this.statusBar.text = `${icon} rust-analyzer`;
+        this.statusBar.text = `${icon}rust-analyzer`;
     }
 
     pushCleanup(d: Disposable) {