Skip to content

[cxx-interop] a Swift module that enables interop should not force client Swift module to fail to import CxxShim #65831

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

Closed
Tracked by #65808
hyp opened this issue May 10, 2023 · 0 comments · Fixed by #65875
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. c++ interop Feature: Interoperability with C++ triage needed This issue needs more specific labels

Comments

@hyp
Copy link
Contributor

hyp commented May 10, 2023

RIght now when a Swift module A enables interoperability, and Swift module B that consumes it doesn't, the compiler will fail to compile B with the following error:

lib/swift/macosx/arm64/libcxxshim.modulemap:1:8: error: module 'CxxShim' requires feature 'cplusplus'
module CxxShim {
       ^
<unknown>:0: error: could not build Objective-C module 'CxxShim'

--

Module A should not force the client to consume B, or if B consumes it, it should not require cplusplus.

@hyp hyp added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. c++ interop Feature: Interoperability with C++ triage needed This issue needs more specific labels labels May 10, 2023
@hyp hyp self-assigned this May 10, 2023
hyp added a commit to hyp/swift that referenced this issue May 11, 2023
hyp added a commit to hyp/swift that referenced this issue May 15, 2023
hyp added a commit to hyp/swift that referenced this issue May 16, 2023
meg-gupta pushed a commit to meg-gupta/swift that referenced this issue May 22, 2023
NuriAmari pushed a commit to NuriAmari/swift that referenced this issue May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. c++ interop Feature: Interoperability with C++ triage needed This issue needs more specific labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant