Skip to content

Commit 6ebbd48

Browse files
committed
Auto merge of rust-lang#14283 - Veykril:error-notifs, r=Veykril
Load proc-macros for rustc_private crates If the client support our server status notification there is no need to show the pop up for workspace fetching failures since that's already going to be shown in the status. cc rust-lang/rust-analyzer#14193
2 parents aff6cb0 + b4bd27b commit 6ebbd48

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

crates/rust-analyzer/src/main_loop.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,12 @@ impl GlobalState {
409409
if self.last_reported_status.as_ref() != Some(&status) {
410410
self.last_reported_status = Some(status.clone());
411411

412-
if let (lsp_ext::Health::Error, Some(message)) = (status.health, &status.message) {
413-
self.show_message(lsp_types::MessageType::ERROR, message.clone());
414-
}
415-
416412
if self.config.server_status_notification() {
417413
self.send_notification::<lsp_ext::ServerStatusNotification>(status);
414+
} else {
415+
if let (lsp_ext::Health::Error, Some(message)) = (status.health, &status.message) {
416+
self.show_message(lsp_types::MessageType::ERROR, message.clone());
417+
}
418418
}
419419
}
420420

crates/rust-analyzer/src/reload.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ impl GlobalState {
202202
tracing::info!(%cause, "will switch workspaces");
203203

204204
if let Err(error_message) = self.fetch_workspace_error() {
205-
self.show_and_log_error(error_message, None);
205+
if !self.config.server_status_notification() {
206+
self.show_and_log_error(error_message, None);
207+
}
206208
if !self.workspaces.is_empty() {
207209
// It only makes sense to switch to a partially broken workspace
208210
// if we don't have any workspace at all yet.

0 commit comments

Comments
 (0)