-
Notifications
You must be signed in to change notification settings - Fork 216
[Explicit Module Builds] Add isFramework flag to the dependency graph and swift module info.
#204
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
| type: .swiftModule) | ||
| // Since this module has already been built, it is no longer relevant | ||
| // whether it is a framework or not. | ||
| isFramework = false |
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.
Is this comment true? An already-built .swiftmodule can be part of a .framework. This happens both with libraries built for distribution (the .swiftmodule and .swiftinterface are installed together) and with libraries not built for distribution (where it's just the .swiftmodule).
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.
... and even if we don't "need" to know when it's a framework, is it better to have that information for consistency reasons?
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.
The explicitCompiledModulePath is used only during placeholder dependency resolution, which tells us that this .swiftmodule is built as a part of an external dependency (separate from the compiledModuleCandidates). With that in mind, I guess my thought process was that it is the responsibility of the builder/planner of that external dependency to ensure that it is treated correctly w.r.t. whether or not it is a framework. Hence the "no longer relevant" part.
I do agree that if we don't need to know it's a framework, it is better to have that information; though, I am not yet sure how we can get this information. Perhaps we can have SwiftPM query it from the swift-driver after planning and propagate it to the dependees along with the .swiftmodule path and the dependency graph.
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.
If it’s not needed you could change the variable name to something like isNonPreCompiledFramework. Then this false isn’t a lie 😅
1758095 to
0b05b03
Compare
|
@swift-ci please test |
0b05b03 to
5e9ad89
Compare
…ph and swift module info. Ensure the flag is propagated from a given swift module's dependency graph details to its swift module info passed in as an explicit module map to frontend jobs.
5e9ad89 to
70f502b
Compare
|
@swift-ci please test |
1 similar comment
|
@swift-ci please test |
Ensure the flag is propagated from a given swift module's dependency graph details to its swift module info passed in as an explicit module map to frontend jobs.
This is a companion PR to:
swiftlang/swift#33430