diff options
author | Aleksey Kladov <[email protected]> | 2020-08-25 10:27:22 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-08-25 10:43:21 +0100 |
commit | 3a72afed8cca3288fb955e66521f62f57aceace2 (patch) | |
tree | 5dcc5e12e667ab5972e37b0df313db2f6e9044f3 /crates/rust-analyzer/src/reload.rs | |
parent | b4bc34649857cfcf7fcb39b9af02342fb7b8c89e (diff) |
Improve logging
Diffstat (limited to 'crates/rust-analyzer/src/reload.rs')
-rw-r--r-- | crates/rust-analyzer/src/reload.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs index 505505a77..20019b944 100644 --- a/crates/rust-analyzer/src/reload.rs +++ b/crates/rust-analyzer/src/reload.rs | |||
@@ -92,6 +92,7 @@ impl GlobalState { | |||
92 | } | 92 | } |
93 | } | 93 | } |
94 | pub(crate) fn fetch_workspaces(&mut self) { | 94 | pub(crate) fn fetch_workspaces(&mut self) { |
95 | log::info!("will fetch workspaces"); | ||
95 | self.task_pool.handle.spawn({ | 96 | self.task_pool.handle.spawn({ |
96 | let linked_projects = self.config.linked_projects.clone(); | 97 | let linked_projects = self.config.linked_projects.clone(); |
97 | let cargo_config = self.config.cargo.clone(); | 98 | let cargo_config = self.config.cargo.clone(); |
@@ -112,13 +113,14 @@ impl GlobalState { | |||
112 | } | 113 | } |
113 | }) | 114 | }) |
114 | .collect::<Vec<_>>(); | 115 | .collect::<Vec<_>>(); |
116 | log::info!("did fetch workspaces {:?}", workspaces); | ||
115 | Task::Workspaces(workspaces) | 117 | Task::Workspaces(workspaces) |
116 | } | 118 | } |
117 | }); | 119 | }); |
118 | } | 120 | } |
119 | pub(crate) fn switch_workspaces(&mut self, workspaces: Vec<anyhow::Result<ProjectWorkspace>>) { | 121 | pub(crate) fn switch_workspaces(&mut self, workspaces: Vec<anyhow::Result<ProjectWorkspace>>) { |
120 | let _p = profile::span("GlobalState::switch_workspaces"); | 122 | let _p = profile::span("GlobalState::switch_workspaces"); |
121 | log::info!("reloading projects: {:?}", self.config.linked_projects); | 123 | log::info!("will switch workspaces: {:?}", workspaces); |
122 | 124 | ||
123 | let mut has_errors = false; | 125 | let mut has_errors = false; |
124 | let workspaces = workspaces | 126 | let workspaces = workspaces |
@@ -223,6 +225,7 @@ impl GlobalState { | |||
223 | self.analysis_host.apply_change(change); | 225 | self.analysis_host.apply_change(change); |
224 | self.process_changes(); | 226 | self.process_changes(); |
225 | self.reload_flycheck(); | 227 | self.reload_flycheck(); |
228 | log::info!("did switch workspaces"); | ||
226 | } | 229 | } |
227 | 230 | ||
228 | fn reload_flycheck(&mut self) { | 231 | fn reload_flycheck(&mut self) { |