@@ -86,7 +86,7 @@ def __init__(self, manager: 'BuildManager', graph: Graph) -> None:
86
86
self .manager = manager
87
87
self .graph = graph
88
88
self .files = manager .modules
89
- self .types = manager .all_types # Non-empty for tests only or if dumping deps
89
+ self .types = manager .all_types # Non-empty if export_types True in options
90
90
self .used_cache = manager .cache_enabled
91
91
self .errors = [] # type: List[str] # Filled in by build if desired
92
92
@@ -662,7 +662,7 @@ class BuildManager:
662
662
Semantic analyzer, pass 2
663
663
semantic_analyzer_pass3:
664
664
Semantic analyzer, pass 3
665
- all_types: Map {Expression: Type} collected from all modules (tests only )
665
+ all_types: Map {Expression: Type} from all modules (enabled by export_types )
666
666
options: Build options
667
667
missing_modules: Set of modules that could not be imported encountered so far
668
668
stale_modules: Set of modules that needed to be rechecked (only used by tests)
@@ -708,7 +708,7 @@ def __init__(self, data_dir: str,
708
708
self .errors , self .plugin )
709
709
self .semantic_analyzer_pass3 = SemanticAnalyzerPass3 (self .modules , self .errors ,
710
710
self .semantic_analyzer )
711
- self .all_types = {} # type: Dict[Expression, Type] # Used by tests only
711
+ self .all_types = {} # type: Dict[Expression, Type] # Enabled by export_types
712
712
self .indirection_detector = TypeIndirectionVisitor ()
713
713
self .stale_modules = set () # type: Set[str]
714
714
self .rechecked_modules = set () # type: Set[str]
@@ -2173,10 +2173,9 @@ def finish_passes(self) -> None:
2173
2173
if self .options .semantic_analysis_only :
2174
2174
return
2175
2175
with self .wrap_context ():
2176
- # Some tests want to look at the set of all types.
2176
+ # Some tests (and tools) want to look at the set of all types.
2177
2177
options = manager .options
2178
- if ((options .use_builtins_fixtures and not options .fine_grained_incremental ) or
2179
- manager .options .dump_deps ):
2178
+ if options .export_types :
2180
2179
manager .all_types .update (self .type_map ())
2181
2180
2182
2181
# We should always patch indirect dependencies, even in full (non-incremental) builds,
0 commit comments