-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[Dependency Scanning] Record header dependencies of binary Swift module dependencies #66556
[Dependency Scanning] Record header dependencies of binary Swift module dependencies #66556
Conversation
8460fef
to
7a769a0
Compare
@swift-ci test |
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.
Makes sense to me!
Is there any example use case for this? I assume you can't really ship a swift module that has bridging header dependencies? The main reason to ask is this is going to a very hard to support corner case for caching, because this is not tracking the dependencies for the bridging header itself. Does build system/swift driver need to be aware of that in non-caching builds? I think the only solution for support caching for this case will be encoding the CASID for the dependencies in swift module. Unfortunately it means that you can only depend on swift binary module builds from CAS when enable caching. |
PCHs started being a part of this field with Explicit modules, since we started feeding them in explicitly as inputs. We do have the alternative of referencing them as a
Perhaps binary modules built with a bridging header need to separately also track dependencies of the bridging header itself?
|
Talk with Artem offline. Caching for this case needs a different solution orthogonal to this fix. Nit: miss a test case for the dependency scanner that make sure the Otherwise, LGTM. |
7a769a0
to
e5b221f
Compare
…le dependencies These are meant to capture paths to the PCH files that a given module was built with.
… dependencies in output and provide libSwiftScan API to query it
e5b221f
to
92d9e61
Compare
@swift-ci test |
When we encounter a pre-built Swift binary module dependency (without an interface file), such module may have been built with a bridging header, which must still be present and is referenced by the binary
.swiftmodule
as either a.h
or, more-likely, a pre-built.pch
in a fully-explicit build.Clients must be able to know about such header dependencies in order to be able to import this binary module, because this binary module may be referencing types brought in via its bridging header. The build-system client (
swift-driver
) will then ensure these header dependencies are fed as inputs to all requiring compilation tasks.