diff options
| author | bors <bors@rust-lang.org> | 2024-04-11 07:01:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-11 07:01:20 +0000 |
| commit | 657b33b0cb9bd49085202e91ad5b4676532c9140 (patch) | |
| tree | 3fb639207b9c21d29104bb4168e8be92f191c283 | |
| parent | a5feb4f05f09adca661c869b1bf2324898cbaa43 (diff) | |
| parent | f7a66fd94cf176468ff45d2aeb5ac5d1ae922c1e (diff) | |
| download | rust-657b33b0cb9bd49085202e91ad5b4676532c9140.tar.gz rust-657b33b0cb9bd49085202e91ad5b4676532c9140.zip | |
Auto merge of #17033 - ShoyuVanilla:flyck-log, r=Veykril
Log flycheck errors Resolves #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
| -rw-r--r-- | crates/flycheck/src/lib.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/flycheck/src/lib.rs b/crates/flycheck/src/lib.rs index fe8e882bf6f..f935ec32d51 100644 --- a/crates/flycheck/src/lib.rs +++ b/crates/flycheck/src/lib.rs @@ -286,7 +286,7 @@ impl FlycheckActor { tracing::debug!(?command, "will restart flycheck"); match CommandHandle::spawn(command) { Ok(command_handle) => { - tracing::debug!(command = formatted_command, "did restart flycheck"); + tracing::debug!(command = formatted_command, "did restart flycheck"); self.command_handle = Some(command_handle); self.report_progress(Progress::DidStart); } @@ -306,10 +306,11 @@ impl FlycheckActor { let formatted_handle = format!("{:?}", command_handle); let res = command_handle.join(); - if res.is_err() { + if let Err(error) = &res { tracing::error!( - "Flycheck failed to run the following command: {}", - formatted_handle + "Flycheck failed to run the following command: {}, error={}", + formatted_handle, + error ); } self.report_progress(Progress::DidFinish(res)); |
