Surpress more rust-analyzer error logs (#42299)
Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
@@ -4519,7 +4519,6 @@ impl LspStore {
|
||||
) {
|
||||
Ok(LspParamsOrResponse::Params(lsp_params)) => lsp_params,
|
||||
Ok(LspParamsOrResponse::Response(response)) => return Task::ready(Ok(response)),
|
||||
|
||||
Err(err) => {
|
||||
let message = format!(
|
||||
"{} via {} failed: {}",
|
||||
@@ -4527,7 +4526,10 @@ impl LspStore {
|
||||
language_server.name(),
|
||||
err
|
||||
);
|
||||
log::warn!("{message}");
|
||||
// rust-analyzer likes to error with this when its still loading up
|
||||
if !message.ends_with("content modified") {
|
||||
log::warn!("{message}");
|
||||
}
|
||||
return Task::ready(Err(anyhow!(message)));
|
||||
}
|
||||
};
|
||||
@@ -4585,7 +4587,10 @@ impl LspStore {
|
||||
language_server.name(),
|
||||
err
|
||||
);
|
||||
log::warn!("{message}");
|
||||
// rust-analyzer likes to error with this when its still loading up
|
||||
if !message.ends_with("content modified") {
|
||||
log::warn!("{message}");
|
||||
}
|
||||
anyhow::anyhow!(message)
|
||||
})?;
|
||||
|
||||
@@ -6907,6 +6912,8 @@ impl LspStore {
|
||||
let mut responses = Vec::new();
|
||||
match server_task.await {
|
||||
Ok(response) => responses.push((server_id, response)),
|
||||
// rust-analyzer likes to error with this when its still loading up
|
||||
Err(e) if format!("{e:#}").ends_with("content modified") => (),
|
||||
Err(e) => log::error!(
|
||||
"Error handling response for inlay hints request: {e:#}"
|
||||
),
|
||||
@@ -8433,7 +8440,7 @@ impl LspStore {
|
||||
match response_result {
|
||||
Ok(response) => responses.push((server_id, response)),
|
||||
// rust-analyzer likes to error with this when its still loading up
|
||||
Err(e) if e.to_string().ends_with("content modified") => (),
|
||||
Err(e) if format!("{e:#}").ends_with("content modified") => (),
|
||||
Err(e) => log::error!("Error handling response for request {request:?}: {e:#}"),
|
||||
}
|
||||
}
|
||||
@@ -12428,7 +12435,7 @@ impl LspStore {
|
||||
match server_task.await {
|
||||
Ok(response) => responses.push((server_id, response)),
|
||||
// rust-analyzer likes to error with this when its still loading up
|
||||
Err(e) if e.to_string().ends_with("content modified") => (),
|
||||
Err(e) if format!("{e:#}").ends_with("content modified") => (),
|
||||
Err(e) => log::error!(
|
||||
"Error handling response for request {request:?}: {e:#}"
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user