Skip to content

[cxx-interop] compilations that do not enable C++ interoperability sh… #66558

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
Jun 12, 2023

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Jun 12, 2023

…ould not be able to import modules that do enable C++ interoperability by default

A supplemental hidden frontend option allows advanced users to opt-out of this requirement.

Fixes #65833
Fixes #65832

  • Explanation:
    When Swift tries to import a module that has C++ interoperability enabled and it imports C++ code, Swift will run into difficult to decipher errors when the compilation doesn't enable interoperability. This change forces Swift to verify that the compilation has C++ interoperability enabled while loading the module, to present a clear error to the user that tells that they need to enabled interop.
  • Scope: C++ interoperability, Swift module format
  • Risk: Medium, changes module format
  • Testing: Swift unit tests.
  • PR: [cxx-interop] compilations that do not enable C++ interoperability sh… #66474

…ould not be able to import modules that do enable C++ interoperability by default

A supplemental hidden frontend option allows advanced users to opt-out of this requirement.

Fixes swiftlang#65833
Fixes swiftlang#65832
@hyp hyp added the c++ interop Feature: Interoperability with C++ label Jun 12, 2023
@hyp hyp requested a review from a team as a code owner June 12, 2023 16:07
@hyp
Copy link
Contributor Author

hyp commented Jun 12, 2023

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Jun 12, 2023

@swift-ci please test source compatibility

@hyp hyp added the swift 5.9 label Jun 12, 2023
@hyp hyp merged commit bcfd718 into swiftlang:release/5.9 Jun 12, 2023
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