@@ -225,7 +225,7 @@ def update(self, changed_modules: List[Tuple[str, str]]) -> List[str]:
225225 messages , remaining , (next_id , next_path ), blocker = result
226226 changed_modules = [(id , path ) for id , path in changed_modules
227227 if id != next_id ]
228- changed_modules = dedupe_modules (changed_modules + remaining )
228+ changed_modules = dedupe_modules (remaining + changed_modules )
229229 if blocker :
230230 self .blocking_error = (next_id , next_path )
231231 self .stale = changed_modules
@@ -283,8 +283,7 @@ def update_single(self, module: str, path: str) -> Tuple[List[str],
283283 update_dependencies ({module : tree }, self .deps , graph , self .options )
284284 propagate_changes_using_dependencies (manager , graph , self .deps , triggered ,
285285 {module },
286- self .previous_targets_with_errors ,
287- graph )
286+ self .previous_targets_with_errors )
288287
289288 # Preserve state needed for the next update.
290289 self .previous_targets_with_errors = manager .errors .targets ()
@@ -408,7 +407,10 @@ def update_single_isolated(module: str,
408407 remaining_modules = changed_modules
409408 # The remaining modules haven't been processed yet so drop them.
410409 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 ]
412414 del graph [id ]
413415 if DEBUG :
414416 print ('--> %r (newly imported)' % module )
@@ -715,8 +717,7 @@ def propagate_changes_using_dependencies(
715717 deps : Dict [str , Set [str ]],
716718 triggered : Set [str ],
717719 up_to_date_modules : Set [str ],
718- targets_with_errors : Set [str ],
719- modules : Iterable [str ]) -> None :
720+ targets_with_errors : Set [str ]) -> None :
720721 # TODO: Multiple type checking passes
721722 num_iter = 0
722723
@@ -731,7 +732,7 @@ def propagate_changes_using_dependencies(
731732 # Also process targets that used to have errors, as otherwise some
732733 # errors might be lost.
733734 for target in targets_with_errors :
734- id = module_prefix (modules , target )
735+ id = module_prefix (manager . modules , target )
735736 if id is not None and id not in up_to_date_modules :
736737 if id not in todo :
737738 todo [id ] = set ()
0 commit comments