]> git.lizzy.rs Git - rust.git/commitdiff
fix: Clear proc-macro changed flag when reloading workspace
authorLukas Wirth <lukastw97@gmail.com>
Wed, 15 Jun 2022 12:29:13 +0000 (14:29 +0200)
committerLukas Wirth <lukastw97@gmail.com>
Wed, 15 Jun 2022 12:29:13 +0000 (14:29 +0200)
crates/rust-analyzer/src/handlers.rs
crates/rust-analyzer/src/reload.rs
editors/code/src/ctx.ts

index ff61081aa81f9e735fd5d0c78560c7c7c3115423..69a03850b5cefb1313ef613a5ad474516c91a295 100644 (file)
@@ -45,6 +45,7 @@
 
 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(())
index 81afdd8f7b65e8716c0d8adfeb7d658fee73c859..62a446ce2a68ef124eba8736f0f77a338f772e7f 100644 (file)
@@ -162,7 +162,7 @@ pub(crate) fn fetch_workspaces(&mut self, cause: Cause) {
     }
 
     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| {
index 51781b4205cd40fe103dc19fc9ac8f65380dafd5..10063470f79f28adfcb65f01f4c245effb3fce25 100644 (file)
@@ -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) {