Repository navigation
Fix Swift 6.4 concurrency warnings - #823
Open
stackotter wants to merge 1 commit into
Open
stackotter wants to merge 1 commit into
stackotter wants to merge 1 commit into
Conversation
stackotter
requested review from
MiaKoring,
bbrk24 and
mba6comma1
as code owners
November 28, 2026 07:39
Member
|
I haven't tested anything yet and won't be able to for several hours, but the code looks reasonable enough to me. (Saying this since I was requested as a code owner.) |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes some Swift 6.4 concurrency warnings. The changes to DefaultBackend cause some backend-specific details to leak, because re-exporting the backend classes also causes extensions from their modules to get re-exported. E.g. importing DefaultBackend now gives you access to the
inspectWindowmodifier. I don't think there's any other way to make this work, so this approach will have to do.The other main issue was that backends that have been split into a file per backend no longer conformed to Sendable in the file declaring their main backend class. This was an easy fix; I just added explicit Sendable conformances to the class declarations.
Approaches to fixing the DefaultBackend concurrency issues were explored using AI while I did something else.
For completeness, here's the main concurrency warning that prompted these changes:
You get that warning if you import DefaultBackend in your main App file as a user of SwiftCrossUI. And only if you were using Swift 6.4