-
Notifications
You must be signed in to change notification settings - Fork 127
Swift 6: Room and Track state #652
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
Conversation
@@ -18,7 +18,7 @@ | |||
|
|||
import Foundation | |||
|
|||
enum BroadcastBundleInfo { | |||
actor BroadcastBundleInfo { |
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.
This is also mostly for the static state (including "mutable" property wrappers below).
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.
This is a great PR, there are just two warnings remaining:
- SampleBufferVideoRenderer.swift:L96: “capture of 'sampleBuffer' with non-sendable type 'CMSampleBuffer' in a
@Sendable
closure” - ARCameraCaptureOptions:L27: “non-final class 'ARCameraCaptureOptions' cannot conform to 'Sendable'; use '@unchecked Sendable”
There's some stubborn Vision Pro sim:
Does not seem related to the PR itself, I'll merge anyway - keeping an eye on that 🙃 |
This is the last 🎉 portion of Swift 6 warnings, mostly around
State
.The algorithm is still pretty simple:
final (internal)
/immutable → make itSendable
@unchecked Sendable
Unit tests are mostly
@unchecked
because of inheritance, IMO gradually moving to Swift Testing is more important.Fortunately, for most generic/async stuff
T: Sendable
is just works (tm), just needs proper annotations.