-
Notifications
You must be signed in to change notification settings - Fork 115
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
Fix warnings generated by swift proposal SE-0364: Conformances of External Types #14920
Conversation
… the protocol requirement satisfied by main actor-isolated instance method 'handleRemoteNotificationInTheBackground(userInfo:)' cannot cross actor boundary; this is an error in the Swift 6 language mode`
… proposal SE-0364
…ntroller because of swift proposal SE-0364
…swift proposal SE-0364
…port`, because of swift proposal SE0364.
… of swift proposal SE-0364
…arning generated by swift proposal SE-0364
Generated by 🚫 Danger |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smoke tested on simulator iPhone 16 Pro iOS 18.2:
✅ Blaze campaign list
✅ Stock dashboard card
✅ Creating shipping label package with duplicated name
✅ App navigation bar
✅ Gift card error
And confirmed that these work as expected.
I did a quick search in the warning list and found a few others still around. Should we handle them as well?

Regarding this message in the PR description:
I'd appreciate it if you could do smoke testing on the affected changes instead of assuming the changes not introducing any regressions. We cannot be too careful IMO. |
…ings-due-to-swift-proposal-SE-0364
Thanks, Huong, for the review. I'm not always able to replicate the warnings that you see, so I have to run the app multiple times. I think it's another Xcode issue. For example, at the moment I see just 16 warnings, but I know there are 70+ currently. In any case, I fixed the fourth warning mentioned in your comment. Please feel free to check again if you see other warnings. Changes here: af384d3
I did a smoke test on the affected changes (including the new ones), and I didn't find any regressions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates!
Description
This PR fixes a certain number of warnings that started appearing with Swift 6 and Xcode 16, because of the swift proposal SE-0364.
Basically, this proposal introduces a series of warnings that can occur when there is a conformance to a specific protocol for classes declared in a separate module. In Woo Mobile, there are many different modules declared.
One common case, for example, is having a specific struct like
BlazeCampaignListItem
declared in theNetworking
layer, but with a conformance toIdentifiable
declared in the main WooCommerce module.For example, consider this extension declared in
BlazeCampaignListViewModel
, whileBlazeCampaignListItem
is declared in theNetworking
layer:This generates the warning:
Extension declares a conformance of imported type 'BlazeCampaignListItem' to imported protocol 'Identifiable'; this will not behave correctly if the owners of 'Networking' introduce this conformance in the future.
To fix this, we should either move this conformance into the relevant module or add the
@retroactive
attribute. For classes/structs under our control, I moved them into the relevant module. For other classes in modules where we do not have control (e.g., Foundation or UIKit), I added the@retroactive
attribute.Steps to reproduce
trunk
.Testing information
Just run a quick and generic smoke testing, these changes should not introduce a regression.
RELEASE-NOTES.txt
if necessary.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: