@@ -12,7 +12,6 @@ use crate::build::compile::{mark_modules_with_deleted_deps_dirty, mark_modules_w
1212use crate :: helpers:: emojis:: * ;
1313use crate :: helpers:: { self , get_workspace_root} ;
1414use crate :: sourcedirs;
15- use ahash:: AHashSet ;
1615use anyhow:: { anyhow, Result } ;
1716use build_types:: * ;
1817use console:: style;
@@ -275,7 +274,7 @@ impl fmt::Display for IncrementalBuildError {
275274pub fn incremental_build (
276275 build_state : & mut BuildState ,
277276 default_timing : Option < Duration > ,
278- initial_build : bool ,
277+ _initial_build : bool ,
279278 show_progress : bool ,
280279 only_incremental : bool ,
281280 create_sourcedirs : bool ,
@@ -349,17 +348,7 @@ pub fn incremental_build(
349348 ) ;
350349 }
351350
352- // track the compile dirty state, we reset it when the compile fails
353- let mut tracked_dirty_modules = AHashSet :: new ( ) ;
354- for ( module_name, module) in build_state. modules . iter ( ) {
355- if module. compile_dirty {
356- tracked_dirty_modules. insert ( module_name. to_owned ( ) ) ;
357- }
358- }
359- if initial_build {
360- // repair broken state
361- mark_modules_with_expired_deps_dirty ( build_state) ;
362- }
351+ mark_modules_with_expired_deps_dirty ( build_state) ;
363352 mark_modules_with_deleted_deps_dirty ( build_state) ;
364353 current_step += 1 ;
365354
@@ -418,12 +407,6 @@ pub fn incremental_build(
418407 ) ;
419408 }
420409 log:: error!( "{}" , & compile_errors) ;
421- // mark the original files as dirty again, because we didn't complete a full build
422- for ( module_name, module) in build_state. modules . iter_mut ( ) {
423- if tracked_dirty_modules. contains ( module_name) {
424- module. compile_dirty = true ;
425- }
426- }
427410 Err ( IncrementalBuildError :: CompileError ( None ) )
428411 } else {
429412 if show_progress {
0 commit comments