Skip to content

Add a Test Demonstrating Superfluous Cascading Across Module Boundaries #32122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2020

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Jun 1, 2020

The idea is this: If we can have private intra-module dependencies, why
not also have private inter-module dependencies. Currently, this is
impossible because all edges from the CompilerInstance-level
DependencyTracker are unconditionally registered as cascading. In
addition, module loads are charged as depenendents to all files in
a given batch, which means the exact set of external dependencies is
some (non-deterministic) superset of all files in the batch.

This test case demonstrates one outcome of this approach: we recompile
way too much when a dependent module changes.

The idea is this: If we can have private intra-module dependencies, why
not also have private inter-module dependencies. Currently, this is
impossible because all edges from the CompilerInstance-level
DependencyTracker are unconditionally registered as cascading. In
addition, module loads are charged as depenendents to all files in
a given batch, which means the exact set of external dependencies is
some (non-deterministic) superset of the external dependencies of each
files in the batch.

This test case demonstrates one outcome of this approach: we recompile
*way* too much when a dependent module changes.
@CodaFi
Copy link
Contributor Author

CodaFi commented Jun 1, 2020

@swift-ci smoke test and merge

@compnerd
Copy link
Member

compnerd commented Jun 2, 2020

@swift-ci please test Windows platform

@compnerd
Copy link
Member

compnerd commented Jun 2, 2020

@swift-ci please smoke test Linux platform

@CodaFi
Copy link
Contributor Author

CodaFi commented Jun 2, 2020

@CodaFi CodaFi merged commit 0475efd into swiftlang:master Jun 2, 2020
@CodaFi CodaFi deleted the modulality branch June 2, 2020 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants