This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ pub enum Progress {
125125 DidCheckCrate ( String ) ,
126126 DidFinish ( io:: Result < ( ) > ) ,
127127 DidCancel ,
128+ DidFailToRestart ( String ) ,
128129}
129130
130131enum Restart {
@@ -193,10 +194,11 @@ impl FlycheckActor {
193194 self . progress ( Progress :: DidStart ) ;
194195 }
195196 Err ( error) => {
196- tracing:: error!(
197- command = ?self . check_command( ) ,
198- %error, "failed to restart flycheck"
199- ) ;
197+ self . progress ( Progress :: DidFailToRestart ( format ! (
198+ "Failed to run the following command: {:?} error={}" ,
199+ self . check_command( ) ,
200+ error
201+ ) ) ) ;
200202 }
201203 }
202204 }
Original file line number Diff line number Diff line change @@ -529,6 +529,13 @@ impl GlobalState {
529529 }
530530 flycheck:: Progress :: DidCheckCrate ( target) => ( Progress :: Report , Some ( target) ) ,
531531 flycheck:: Progress :: DidCancel => ( Progress :: End , None ) ,
532+ flycheck:: Progress :: DidFailToRestart ( err) => {
533+ self . show_and_log_error (
534+ "cargo check failed" . to_string ( ) ,
535+ Some ( err. to_string ( ) ) ,
536+ ) ;
537+ return ;
538+ }
532539 flycheck:: Progress :: DidFinish ( result) => {
533540 if let Err ( err) = result {
534541 self . show_and_log_error (
You can’t perform that action at this time.
0 commit comments