Skip to content

[5.9 🍒][Dependency Scannning] Handle special case import of Clang Private "submodules" #66151

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

Merged
merged 1 commit into from
May 26, 2023

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented May 25, 2023

Cherry-pick of #66148

There is a special case that already exists in 'ClangImporter' for implicit module loading: Import of a "submodule" named "Foo.Private" is treated as a top-level module named "Foo_Private". Clang has special support for this.

Release: Swift 5.9
Explanation: There is a special case that already exists in ClangImporter for implicit module loading: Import of a "submodule" named Foo.Private is treated as a top-level module named Foo_Private. Clang has special support for this. The dependency scanner didn't know this, so imports of Foo.Private instead got treated as imports of Foo resulting in scanning result containing incorrect result compared to what the loading compilation will expect.
Scope of Issue: Explicit module builds of projects whose source contains this kind of import will not work.
Origination: This was a missed special case in the dependency scanner implementation
Risk: Minimal, this is an additive change to make sure such import statements are correctly resolved to the expected Clang top-level _Private module.

Resolves rdar://108287140

…ubmodules"

There is a special case that already exists in 'ClangImporter' for implicit module loading:
Import of a "submodule" named "Foo.Private" is treated as a top-level module named "Foo_Private".
Clang has special support for this.

Resolves rdar://108287140
@artemcm artemcm requested a review from nkcsgexi May 25, 2023 21:08
@artemcm artemcm requested a review from a team as a code owner May 25, 2023 21:08
@artemcm
Copy link
Contributor Author

artemcm commented May 25, 2023

@swift-ci test

@artemcm
Copy link
Contributor Author

artemcm commented May 25, 2023

@swift-ci test

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