-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[Dependency Scanning] Avoid querying Swift Overlay for underlying module #84443
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] Avoid querying Swift Overlay for underlying module #84443
Conversation
@swift-ci smoke 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.
Do we have a test case for the overlay/underlying module change?
return; | ||
} | ||
|
||
// Avoid overlay lookup for the underlying module of a known Swift module |
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 suggest reword this comment and commit message a bit. Overlay/underlying is a generic term but here we only skip the current module and its underlying (@_exported import) module. I didn't quite get what this does in the first place when I read the comment and message.
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.
Do we have a test case for the overlay/underlying module change?
It's very tricky to write one, as even when it was queried we already had logic in place to ensure we don't add the result to the graph. e.g. When scanning A
, we would query Swift overlay for underlying Clang module A
and find some other A.swiftmodule
in the search paths, we would simply discard this result. Now we don't even query it but it's challenging to verify this behavior change.
221b96d
to
34a314d
Compare
@swift-ci smoke test |
@swift-ci smoke test Linux platform |
@swift-ci smoke test macOS platform |
@swift-ci smoke test |
Avoid Swift Overlay lookup for the underlying clang module of a known Swift module. i.e. When computing set of Swift Overlay dependencies for module 'A', which depends on a Clang module 'A', ensure we don't lookup Swift module 'A' itself here - this can lead to bizarre interactions where the source module under scan is queried as a dependency of itself. Resolves rdar://159706486
34a314d
to
e9a7519
Compare
@swift-ci smoke test |
This can lead to bizarre interactions where the source module under scan is queried as a dependency of itself.
On top of that, properly restrict embedded compilation mode to load serialized binary modules, only.
Resolves rdar://159706486