-
Notifications
You must be signed in to change notification settings - Fork 14k
Closed
Labels
A-incr-compArea: Incremental compilationArea: Incremental compilation
Description
In the current setup, we create the DepGraph very early, so it can be put into the CrateStore and the Session object. This means that we construct the DepGraph long before we have enough information to know where to load the previous DepGraph from and, because the CrateStore is used very early too, we are registering dep-nodes and edges before the graph is fully operational. This is ugly but harmless in the current implementation. In the new tracking system it would become a problem.
So the plan is to construct the DepGraph only when we can already load the previous DepGraph. This needs some refactoring:
- Remove the
dep_graphfield fromSession, - rustc: RemoveSession::dep_graph#44502 - Remove the
dep_graphfield fromCStoreand don't do any dependency tracking in the regularCStoreimplementation. - rustc: RemoveDepGraphhandling from rustc_metadata #44418 - Make sure that we do perform dependency tracking for anything within the query system, via a tasteful blend of: - Migrate a slew of metadata methods to queries #44142 and rustc: Make
CrateStoreprivate toTyCtxt#44420- creating a
CrateStorewrapper that does dependency tracking and make only that available viatcx.cstore(), and - Migrate a slew of metadata methods to queries #44142 - making all
CrateStoreaccess go through queries. - Migrate a slew of metadata methods to queries #44142
- creating a
- Adapt
librustc_incremental::persist::fs::prepare_session_directory()to not need thetcxand invoke it right after parsing, when we know the definitive crate name. - rustc: RemoveSession::dep_graph#44502 - Move
DepGraphconstruction to right afterlibrustc_incremental::persist::fs::prepare_session_directory()has been called. - rustc: RemoveSession::dep_graph#44502
Any work in this direction will want to be based on top of #44341 the master branch.
Metadata
Metadata
Assignees
Labels
A-incr-compArea: Incremental compilationArea: Incremental compilation