Skip to content

Conversation

@Xazax-hun
Copy link
Contributor

Currently, C++ types cannot appear in resilient interfaces. There are some cases where this is overly restrictive. We plan to improve the logic to detect what types should not appear on resilient moduel boundaries. In the meantime, this PR introduces a flag to disable these errors. Users relying on this flag are on their own, this should only be a temporary workaround until we land further improvements to this diagnostic.

rdar://137457118

@Xazax-hun Xazax-hun added the c++ interop Feature: Interoperability with C++ label Oct 8, 2024
@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@ravikandhadai ravikandhadai Oct 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better not to use experimental feature since this is a flag to opt out of the error and not really a feature. Think it would better to have a flag that reads like allow-cxx-types-in-swift-interface

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I prefer the experimental feature approach because they are easier to add and remove. If you add flags, you have to update the drivers and frontend, and possibly leave them in forever. Experimental features are more self-contained.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me.

Currently, C++ types cannot appear in resilient interfaces. There are
some cases where this is overly restrictive. We plan to improve the
logic to detect what types should not appear on resilient moduel
boundaries. In the meantime, this PR introduces a flag to disable these
errors. Users relying on this flag are on their own, this should only be
a temporary workaround until we land further improvements to this
diagnostic.

rdar://137457118
@Xazax-hun Xazax-hun force-pushed the gaborh/assume-resilient-cxx-types branch from 0428799 to cf3b333 Compare October 9, 2024 11:20
@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

@Xazax-hun Xazax-hun merged commit b5a85ed into main Oct 10, 2024
@Xazax-hun Xazax-hun deleted the gaborh/assume-resilient-cxx-types branch October 10, 2024 16:15
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++

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants