Skip to content

[cxx-interop] implicitly imported CxxShim module should not force cli… #65948

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 16, 2023

Conversation

hyp
Copy link
Contributor

@hyp hyp commented May 16, 2023

…ent modules to enable C++ interoperability

Fixes #65831

  • Explanation: When C++ interop is enabled, 'CxxShim' module was imported without '@_implementationOnly' implicitly by the compiler. This made it impossible to import such module that used C++ interop, but didn't expose it in its public interface into another Swift module that didn't enable C++ interop. This fix allows for that now, so a regular Swift module can now import a module that uses C++ interop in its implementation but not its public interface.
  • Scope: Swift's and C++ interop, implicit imports in frontend.
  • Risk: Low. Only affects C++ interoperability and doesn't change behavior for building modules that use C++ interop.
  • Testing: Swift unit tests.
  • PR: [cxx-interop] implicitly imported CxxShim module should not force cli… #65875
  • reviewed by: @egorzhdan

@hyp hyp added the c++ interop Feature: Interoperability with C++ label May 16, 2023
@hyp hyp requested a review from a team as a code owner May 16, 2023 16:16
@hyp hyp added the swift 5.9 label May 16, 2023
@hyp
Copy link
Contributor Author

hyp commented May 16, 2023

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented May 16, 2023

@swift-ci please test source compatibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++ swift 5.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants