Skip to content

Commit 82c90b3

Browse files
committed
Auto merge of rust-lang#17033 - ShoyuVanilla:flyck-log, r=Veykril
Log flycheck errors Resolves rust-lang#16969 The non-cargo messages are appended to the error strings here; https://github.com/rust-lang/rust-analyzer/blob/7a8374c162c64c17e865b98aad282d16b16e96d6/crates/flycheck/src/lib.rs#L460-L482 that one is formatted into `Err` here; https://github.com/rust-lang/rust-analyzer/blob/7a8374c162c64c17e865b98aad282d16b16e96d6/crates/flycheck/src/command.rs#L144-L155 and finally, this PR appends it at the end of existing Flycheck error message
2 parents 5a87dd6 + d090db5 commit 82c90b3

File tree

1 file changed

+5
-4
lines changed
  • src/tools/rust-analyzer/crates/flycheck/src

1 file changed

+5
-4
lines changed

src/tools/rust-analyzer/crates/flycheck/src/lib.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ impl FlycheckActor {
286286
tracing::debug!(?command, "will restart flycheck");
287287
match CommandHandle::spawn(command) {
288288
Ok(command_handle) => {
289-
tracing::debug!(command = formatted_command, "did restart flycheck");
289+
tracing::debug!(command = formatted_command, "did restart flycheck");
290290
self.command_handle = Some(command_handle);
291291
self.report_progress(Progress::DidStart);
292292
}
@@ -306,10 +306,11 @@ impl FlycheckActor {
306306
let formatted_handle = format!("{:?}", command_handle);
307307

308308
let res = command_handle.join();
309-
if res.is_err() {
309+
if let Err(error) = &res {
310310
tracing::error!(
311-
"Flycheck failed to run the following command: {}",
312-
formatted_handle
311+
"Flycheck failed to run the following command: {}, error={}",
312+
formatted_handle,
313+
error
313314
);
314315
}
315316
self.report_progress(Progress::DidFinish(res));

0 commit comments

Comments
 (0)