[6.0 🍒][Dependency Scanning] Resolve cross-import overlays relative to defining interface for prebuilt binary Swift dependencies #74949
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation: When the dependency scanner picks a pre-built binary module candidate for a given dependency, it needs to be able to attempt to resolve its cross-import overlays relative to the textual interface that the binary module was built from. For example, if a collection of binary modules are located in, and resolved as dependencies from, a pre-built module directory, the scanner must lookup their corresponding cross-import overlays relative to the defining interface as read out from the binary module's MODULE_INTERFACE_PATH. [Serialization] Always serialize module-defining
.swiftinterface
, even if SDK-relative. #70817 ensures that binary modules serialize the path to their defining textual interface.Scope: This change affects Explicit Module Builds (opt-in) which rely on binary module dependencies that are placed separately from textual interface files they were built from. (e.g. prebuilt module cache)
Risk: Low. This change is additive to the logic of cross-import lookup and predominantly affects the code-path that would previously fail to correctly identify cross-import overlays. It does not affect lookup of cross-import overlays that otherwise succeeds relative to the path of the
.swiftmodule
dependency itself.Original PR: [Dependency Scanning] Resolve cross-import overlays relative to defining interface for prebuilt binary Swift dependencies #74945
Issue/Radar: rdar://130778577
Reviewers: @cachemeifyoucan