@@ -898,9 +898,6 @@ def find_cache_meta(id: str, path: str, manager: BuildManager) -> Optional[Cache
898898 # Note that it's fine to mutilate cached_options since it's only used here.
899899 cached_options = m .options
900900 current_options = manager .options .clone_for_module (id ).select_options_affecting_cache ()
901- if manager .options .quick_and_dirty :
902- # In quick_and_dirty mode allow non-quick_and_dirty cache files.
903- cached_options ['quick_and_dirty' ] = True
904901 if manager .options .skip_version_check :
905902 # When we're lax about version we're also lax about platform.
906903 cached_options ['platform' ] = current_options ['platform' ]
@@ -1598,7 +1595,6 @@ def fix_cross_refs(self) -> None:
15981595 # We need to set quick_and_dirty when doing a fine grained
15991596 # cache load because we need to gracefully handle missing modules.
16001597 fixup_module (self .tree , self .manager .modules ,
1601- self .manager .options .quick_and_dirty or
16021598 self .options .use_fine_grained_cache )
16031599
16041600 def patch_dependency_parents (self ) -> None :
@@ -1866,10 +1862,7 @@ def write_cache(self) -> None:
18661862 or self .options .cache_dir == os .devnull
18671863 or self .options .fine_grained_incremental ):
18681864 return
1869- if self .manager .options .quick_and_dirty :
1870- is_errors = self .manager .errors .is_errors_for_file (self .path )
1871- else :
1872- is_errors = self .transitive_error
1865+ is_errors = self .transitive_error
18731866 if is_errors :
18741867 delete_cache (self .id , self .path , self .manager )
18751868 self .meta = None
@@ -2431,8 +2424,7 @@ def process_graph(graph: Graph, manager: BuildManager) -> None:
24312424 deps .update (graph [id ].dependencies )
24322425 deps -= ascc
24332426 stale_deps = {id for id in deps if id in graph and not graph [id ].is_interface_fresh ()}
2434- if not manager .options .quick_and_dirty :
2435- fresh = fresh and not stale_deps
2427+ fresh = fresh and not stale_deps
24362428 undeps = set ()
24372429 if fresh :
24382430 # Check if any dependencies that were suppressed according
@@ -2466,9 +2458,7 @@ def process_graph(graph: Graph, manager: BuildManager) -> None:
24662458 manager .trace (" %5s %.0f %s" % (key , graph [id ].xmeta .data_mtime , id ))
24672459 # If equal, give the benefit of the doubt, due to 1-sec time granularity
24682460 # (on some platforms).
2469- if manager .options .quick_and_dirty and stale_deps :
2470- fresh_msg = "fresh(ish)"
2471- elif oldest_in_scc < newest_in_deps :
2461+ if oldest_in_scc < newest_in_deps :
24722462 fresh = False
24732463 fresh_msg = "out of date by %.0f seconds" % (newest_in_deps - oldest_in_scc )
24742464 else :
@@ -2608,19 +2598,7 @@ def process_stale_scc(graph: Graph, scc: List[str], manager: BuildManager) -> No
26082598
26092599 Exception: If quick_and_dirty is set, use the cache for fresh modules.
26102600 """
2611- if manager .options .quick_and_dirty :
2612- fresh = [id for id in scc if graph [id ].is_fresh ()]
2613- fresh_set = set (fresh ) # To avoid running into O(N**2)
2614- stale = [id for id in scc if id not in fresh_set ]
2615- if fresh :
2616- manager .log (" Fresh ids: %s" % (", " .join (fresh )))
2617- if stale :
2618- manager .log (" Stale ids: %s" % (", " .join (stale )))
2619- else :
2620- fresh = []
2621- stale = scc
2622- for id in fresh :
2623- graph [id ].load_tree ()
2601+ stale = scc
26242602 for id in stale :
26252603 # We may already have parsed the module, or not.
26262604 # If the former, parse_file() is a no-op.
@@ -2633,8 +2611,6 @@ def process_stale_scc(graph: Graph, scc: List[str], manager: BuildManager) -> No
26332611 typing_mod = graph ['typing' ].tree
26342612 assert typing_mod , "The typing module was not parsed"
26352613 manager .semantic_analyzer .add_builtin_aliases (typing_mod )
2636- for id in fresh :
2637- graph [id ].fix_cross_refs ()
26382614 for id in stale :
26392615 graph [id ].semantic_analysis ()
26402616 for id in stale :
0 commit comments