@@ -101,7 +101,7 @@ impl BuildManager {
101101
102102 // Log that we're doing an incremental build
103103 info ! ( name: "build" , "Incremental build: {} files changed" , changed_paths. len( ) ) ;
104- info ! ( name: "build" , "Changed files: {:?}" , changed_paths) ;
104+ debug ! ( name: "build" , "Changed files: {:?}" , changed_paths) ;
105105 info ! ( name: "build" , "Rerunning binary without recompilation..." ) ;
106106
107107 self . state
@@ -172,7 +172,10 @@ impl BuildManager {
172172 self . internal_build ( false ) . await
173173 }
174174
175- async fn internal_build ( & self , is_initial : bool ) -> Result < bool , Box < dyn std:: error:: Error + Send + Sync > > {
175+ async fn internal_build (
176+ & self ,
177+ is_initial : bool ,
178+ ) -> Result < bool , Box < dyn std:: error:: Error + Send + Sync > > {
176179 // Cancel any existing build immediately
177180 let cancel = CancellationToken :: new ( ) ;
178181 {
@@ -276,15 +279,20 @@ impl BuildManager {
276279 let stderr_bytes = stderr_task. await . unwrap_or_default ( ) ;
277280
278281 let duration = build_start_time. elapsed ( ) ;
279- let formatted_elapsed_time = format_elapsed_time (
280- duration,
281- & FormatElapsedTimeOptions :: default_dev ( ) ,
282- ) ;
282+ let formatted_elapsed_time =
283+ format_elapsed_time ( duration, & FormatElapsedTimeOptions :: default_dev ( ) ) ;
283284
284285 if status. success ( ) {
285- let build_type = if is_initial { "Initial build" } else { "Rebuild" } ;
286+ let build_type = if is_initial {
287+ "Initial build"
288+ } else {
289+ "Rebuild"
290+ } ;
286291 info ! ( name: "build" , "{} finished {}" , build_type, formatted_elapsed_time) ;
287- self . state . status_manager . update ( StatusType :: Success , "Build finished successfully" ) . await ;
292+ self . state
293+ . status_manager
294+ . update ( StatusType :: Success , "Build finished successfully" )
295+ . await ;
288296
289297 self . update_dependency_tracker ( ) . await ;
290298
@@ -294,14 +302,27 @@ impl BuildManager {
294302 // Raw stderr sometimes has something to say whenever cargo fails
295303 println ! ( "{}" , stderr_str) ;
296304
297- let build_type = if is_initial { "Initial build" } else { "Rebuild" } ;
305+ let build_type = if is_initial {
306+ "Initial build"
307+ } else {
308+ "Rebuild"
309+ } ;
298310 error ! ( name: "build" , "{} failed with errors {}" , build_type, formatted_elapsed_time) ;
299311
300312 if is_initial {
301313 error ! ( name: "build" , "Initial build needs to succeed before we can start the dev server" ) ;
302- self . state . status_manager . update ( StatusType :: Error , "Initial build failed - fix errors and save to retry" ) . await ;
314+ self . state
315+ . status_manager
316+ . update (
317+ StatusType :: Error ,
318+ "Initial build failed - fix errors and save to retry" ,
319+ )
320+ . await ;
303321 } else {
304- self . state . status_manager . update ( StatusType :: Error , & rendered_messages. join ( "\n " ) ) . await ;
322+ self . state
323+ . status_manager
324+ . update ( StatusType :: Error , & rendered_messages. join ( "\n " ) )
325+ . await ;
305326 }
306327
307328 Ok ( false )
@@ -341,7 +362,8 @@ impl BuildManager {
341362 }
342363 }
343364
344- fn get_binary_name_from_cargo_toml ( ) -> Result < String , Box < dyn std:: error:: Error + Send + Sync > > {
365+ fn get_binary_name_from_cargo_toml ( ) -> Result < String , Box < dyn std:: error:: Error + Send + Sync > >
366+ {
345367 let cargo_toml_path = PathBuf :: from ( "Cargo.toml" ) ;
346368 if !cargo_toml_path. exists ( ) {
347369 return Err ( "Cargo.toml not found in current directory" . into ( ) ) ;
0 commit comments