swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.42k stars 10.34k forks source link

✨ Swift should provide support for internal imports and resilience for all platforms (that can be enabled in SwiftPM) to allow Swift modules to depend on C++ modules without requiring that the clients enable C++ interoperability #66156

Open hyp opened 1 year ago

hyp commented 1 year ago

Right now, a Swift target that enables C++ interoperability in SwiftPM requires its dependencies to enable C++ interoperability as well.

We can fix it when Swift supports the following:

This will allow a Swift target to import C++ clang modules using internal qualifier and will allow it to enable resilience. This will ensure that the dependencies that want to use such Swift target do not have to enable C++ interoperability unless they desire to do so.

This issue tracks the support for both features in Swift. Once both features are supported we can start supporting this C++ interoperability use case as well.

hyp commented 1 year ago

We will also need to fix:

https://github.com/apple/swift-package-manager/issues/6564