-
Notifications
You must be signed in to change notification settings - Fork 205
[Explicit Module Builds] Support explicit module builds with external dependencies. #181
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
Conversation
Have we had a consensus about how to resolve cross-import overlays yet? |
No, not yet, that needs further discussion. |
@DougGregor @brentdax What do you think of this plan:
|
…it Package Builds
…include placeholder dependencies
…lders to the scanning action
Resolves `placeholder` dependencies in the dependency graph computed by the scanning action using external dependencies passed in from the client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to do a line-by-line review (sorry), but the structure of this looks exactly like I'd expected and it LGTM.
The toolchain snapshot build with the corresponding Dependency Scanner changes passed so the next created toolchain will allow this to be submitted. I expect it to become available tonight. |
524f795
to
ba0e516
Compare
…uleDependencyGraph
ba0e516
to
30149cb
Compare
@swift-ci please test |
@swift-ci test |
This change introduces support for external dependencies in Explicit Module Build compilation mode.
Building a Swift module in Explicit Module Build mode requires passing all of its module dependencies as explicit arguments to the build command.
When the driver's clients (build systems, e.g. SwiftPM) are planning a build that involves multiple Swift modules, planning for each individual module may take place before its dependencies have been built. This means that the dependency scanning action will not be able to discover such modules. In such cases, the clients must provide the driver with information about such external dependencies, including the path to where their compiled
.swiftmodule
will be located, once built, and a full inter-module dependency graph for each such dependence.The driver will pass down the information about such external dependencies to the scanning action, which will generate
placeholder
swift modules for them in the resulting dependency graph. The driver will then use the complete dependency graph provided by the client for each external dependency and use it to "resolve" the dependency's "placeholder" module.This PR:
swiftPlaceholder
dependencies.This change works in tandem with the corresponding Dependency Scanner change in:
swiftlang/swift#33032
And a corresponding SwiftPM change:
swiftlang/swift-package-manager#2827