@@ -12,7 +12,6 @@ use crate::build::compile::{mark_modules_with_deleted_deps_dirty, mark_modules_w
12
12
use crate :: helpers:: emojis:: * ;
13
13
use crate :: helpers:: { self , get_workspace_root} ;
14
14
use crate :: sourcedirs;
15
- use ahash:: AHashSet ;
16
15
use anyhow:: { anyhow, Result } ;
17
16
use build_types:: * ;
18
17
use console:: style;
@@ -275,7 +274,7 @@ impl fmt::Display for IncrementalBuildError {
275
274
pub fn incremental_build (
276
275
build_state : & mut BuildState ,
277
276
default_timing : Option < Duration > ,
278
- initial_build : bool ,
277
+ _initial_build : bool ,
279
278
show_progress : bool ,
280
279
only_incremental : bool ,
281
280
create_sourcedirs : bool ,
@@ -349,17 +348,7 @@ pub fn incremental_build(
349
348
) ;
350
349
}
351
350
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) ;
363
352
mark_modules_with_deleted_deps_dirty ( build_state) ;
364
353
current_step += 1 ;
365
354
@@ -418,12 +407,6 @@ pub fn incremental_build(
418
407
) ;
419
408
}
420
409
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
- }
427
410
Err ( IncrementalBuildError :: CompileError ( None ) )
428
411
} else {
429
412
if show_progress {
0 commit comments