Skip to content

Conversation

@artemcm
Copy link
Contributor

@artemcm artemcm commented May 6, 2021

This PR is a cherry-pick of: #621


In the near future, planning of PrecompileModuleDependenciesJobs, for explicit module dependencies, will require access to the incremental state in order to incrementalize expensive actions such as dependency scanning.

This change refactors the creation of incremental compilation state in order to move computation of the initial state (dependency graph) to occur before job-generation.
The first wave of jobs is then computed after job-generation, using the initial state, and the set of jobs in the plan, as input.

  • Separate InitialIncrementalStateComputer to run early, by the Driver, to compute the dependency graph and the set of changed inputs. Rename InitialIncrementalStateComputer into IncrementalDependencyAndInputSetup.
  • Introduce FirstWaveComputer which the constructor of the IncrementalCompilationContext uses to compute the mandatoryJobsInOrder set of jobs the executors must run.

@artemcm artemcm force-pushed the CherryPickIncrementalRefactor branch 2 times, most recently from 2c16ef6 to 0935797 Compare May 6, 2021 20:44
@artemcm
Copy link
Contributor Author

artemcm commented May 6, 2021

@swift-ci please test

…e job-generation.

In the near future, planning of `PrecompileModuleDependenciesJobs`, for explicit module dependencies, will require access to the incremental state in order to incrementalize expensive actions such as dependency scanning.

This change refactors the creation of incremental compilation state in order to move computation of the initial state (dependency graph) to occur before job-generation.
The first wave of jobs is then computed after job-generation, using the initial state, and the set of jobs in the plan, as input.

- Separate `InitialIncrementalStateComputer` to run early, by the `Driver`, to compute the dependency graph and the set of changed inputs. Rename `InitialIncrementalStateComputer` into `IncrementalDependencyAndInputSetup`.
- Introduce `FirstWaveComputer` which the constructor of the `IncrementalCompilationContext` uses to compute the `mandatoryJobsInOrder` set of jobs the executors *must* run.
@artemcm artemcm force-pushed the CherryPickIncrementalRefactor branch from 0935797 to 4b4e35a Compare May 6, 2021 21:21
@artemcm
Copy link
Contributor Author

artemcm commented May 6, 2021

@swift-ci please test

@artemcm artemcm requested review from akyrtzi and davidungar May 6, 2021 21:35
@artemcm artemcm merged commit 03bf1b1 into swiftlang:release/5.5 May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants