@@ -225,7 +225,7 @@ def update(self, changed_modules: List[Tuple[str, str]]) -> List[str]:
225
225
messages , remaining , (next_id , next_path ), blocker = result
226
226
changed_modules = [(id , path ) for id , path in changed_modules
227
227
if id != next_id ]
228
- changed_modules = dedupe_modules (changed_modules + remaining )
228
+ changed_modules = dedupe_modules (remaining + changed_modules )
229
229
if blocker :
230
230
self .blocking_error = (next_id , next_path )
231
231
self .stale = changed_modules
@@ -283,8 +283,7 @@ def update_single(self, module: str, path: str) -> Tuple[List[str],
283
283
update_dependencies ({module : tree }, self .deps , graph , self .options )
284
284
propagate_changes_using_dependencies (manager , graph , self .deps , triggered ,
285
285
{module },
286
- self .previous_targets_with_errors ,
287
- graph )
286
+ self .previous_targets_with_errors )
288
287
289
288
# Preserve state needed for the next update.
290
289
self .previous_targets_with_errors = manager .errors .targets ()
@@ -408,7 +407,10 @@ def update_single_isolated(module: str,
408
407
remaining_modules = changed_modules
409
408
# The remaining modules haven't been processed yet so drop them.
410
409
for id , _ in remaining_modules :
411
- del manager .modules [id ]
410
+ if id in old_modules :
411
+ manager .modules [id ] = old_modules [id ]
412
+ else :
413
+ del manager .modules [id ]
412
414
del graph [id ]
413
415
if DEBUG :
414
416
print ('--> %r (newly imported)' % module )
@@ -715,8 +717,7 @@ def propagate_changes_using_dependencies(
715
717
deps : Dict [str , Set [str ]],
716
718
triggered : Set [str ],
717
719
up_to_date_modules : Set [str ],
718
- targets_with_errors : Set [str ],
719
- modules : Iterable [str ]) -> None :
720
+ targets_with_errors : Set [str ]) -> None :
720
721
# TODO: Multiple type checking passes
721
722
num_iter = 0
722
723
@@ -731,7 +732,7 @@ def propagate_changes_using_dependencies(
731
732
# Also process targets that used to have errors, as otherwise some
732
733
# errors might be lost.
733
734
for target in targets_with_errors :
734
- id = module_prefix (modules , target )
735
+ id = module_prefix (manager . modules , target )
735
736
if id is not None and id not in up_to_date_modules :
736
737
if id not in todo :
737
738
todo [id ] = set ()
0 commit comments