Skip to content

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

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

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. #70817 ensures that binary modules serialize the path to their defining textual interface. The scanner will now use this path, and, when relative, resolve it to the scanner's SDK path.

Resolves rdar://130778577

…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
Copy link
Contributor Author

artemcm commented Jul 3, 2024

@swift-ci test

Copy link
Contributor

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -0,0 +1,85 @@
// REQUIRES: objc_interop
// RUN: %empty-directory(%t)
// RUN: %empty-directory(%t/module-cache)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: the first empty-directory covers everything already?

@artemcm artemcm merged commit 15dda6c into swiftlang:main Jul 4, 2024
5 checks passed
@artemcm artemcm deleted the FixCrossImportOnScannerValidatedBinaryModules branch July 4, 2024 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants