Skip to content

[Explicit Module Builds] Refactor the InterModuleDependencyGraph to distinguish prebuilt external dependencies. #287

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
Oct 6, 2020

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Oct 5, 2020

This is a refactoring change intended to reduce ambiguity in what nodes in the dependency graph can represent. As dependency graph structure and individual modules are being communicated and merged among different components, such ambiguities in the graph introduce additional, unnecessary complexity to graph operations.

  • Introduce a new module kind: .swiftPrebuiltExternalDependency.
    This node kind is to be used for external target dependencies built by build system clients. Previously we were using .swift modules to represent both pre-compiled external targets and Swift module dependencies that require a build job to be created by the driver. This new structure means that every .swift module dependency must have a build job constructed for it, and every .swiftPrebuiltExternal module dependency does not require to be built.
  • Factor out and unify common graph operations, so that placeholder resolution and external API for graph merging use common logic.

…istinguish prebuilt external dependencies.

This is a refactoring change intended to reduce ambiguity in what nodes in the dependency graph can represent. As dependency graph structure and individual modules are being communicated and merged among different components, such ambiguities in the graph introduce additional, unnecessary complexity to graph operations.

- Introduce a new module kind: `.swiftPrebuiltExternalDependency`.
This node kind is to be used for external target dependencies built by build system clients such as SwiftPM. Previously we were using `.swift` modules to represent both pre-compiled external targets and Swift module dependencies that require a build job to be created by the driver. This new structure means that every `.swift` module dependency must have a build job constructed for it, and every `.swiftPrebuiltExternal` module dependency does not require to be built.
- Factor out and unify common graph operations.
@artemcm artemcm requested a review from DougGregor October 5, 2020 21:12
@artemcm
Copy link
Contributor Author

artemcm commented Oct 5, 2020

@swift-ci please test

@artemcm artemcm requested a review from nkcsgexi October 5, 2020 23:25
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