Skip to content

[6.0 🍒][Dependency Scanning] Resolve cross-import overlays relative to defining interface for prebuilt binary Swift dependencies #74949

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

artemcm
Copy link
Contributor

@artemcm artemcm commented Jul 3, 2024

  • 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

@artemcm artemcm added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.0 labels Jul 3, 2024
@artemcm artemcm requested a review from a team as a code owner July 3, 2024 19:04
@artemcm
Copy link
Contributor Author

artemcm commented Jul 3, 2024

@swift-ci test

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@artemcm artemcm force-pushed the 60FixCrossImportOnScannerValidatedBinaryModules branch from 3174179 to 3da099a Compare July 3, 2024 21:04
@artemcm
Copy link
Contributor Author

artemcm commented Jul 3, 2024

@swift-ci test

@artemcm artemcm force-pushed the 60FixCrossImportOnScannerValidatedBinaryModules branch from 3da099a to 0441dd3 Compare July 4, 2024 01:05
@artemcm
Copy link
Contributor Author

artemcm commented Jul 4, 2024

@swift-ci test

@artemcm
Copy link
Contributor Author

artemcm commented Jul 8, 2024

@swift-ci test

@artemcm artemcm force-pushed the 60FixCrossImportOnScannerValidatedBinaryModules branch from 0441dd3 to 8b037ac Compare July 8, 2024 18:45
@artemcm
Copy link
Contributor Author

artemcm commented Jul 8, 2024

@swift-ci test

@artemcm artemcm enabled auto-merge July 8, 2024 18:45
…ing interface for prebuilt binary Swift dependencies

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. swiftlang#70817 ensures that binary modules serialize the path to their defining textual interface.

Resolves rdar://130778577
@artemcm artemcm force-pushed the 60FixCrossImportOnScannerValidatedBinaryModules branch from 8b037ac to aef88ea Compare July 8, 2024 19:51
@artemcm
Copy link
Contributor Author

artemcm commented Jul 8, 2024

@swift-ci test

@artemcm artemcm merged commit 112d963 into swiftlang:release/6.0 Jul 9, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants