-
Notifications
You must be signed in to change notification settings - Fork 7
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
Swift 6 compatibility #908
Comments
There is an issue with structs and strict concurrency checking: public struct Flags {
public static let none = Self(isEnabled: false) // Static property 'none' is not concurrency-safe because non-'Sendable' type 'Flags' may have shared mutable state
public let isEnabled: Bool
}
struct Flags2 {
public static let none = Self(isEnabled: false) // No issue
public let isEnabled: Bool
}
struct Flags3 {
static let none = Self(isEnabled: false) // No issue
let isEnabled: Bool
} I am not really understanding why this happens with a constant and since global instantiation is guaranteed to be safe. But this might be worth a deeper look and possibly a bug report if appropriate. |
I investigated further how we could implement Swift 6 concurrency checking in Pillarbox, especially in the PillarboxPlayer package. Current thoughts:
I wrote a small prototype to evaluate the feasibility of this approach. If adopting |
I opened an issue #931 for thread-safety. |
As a developer I would like to benefit from improvements made with Swift 6.
Acceptance criteria
Tasks
The text was updated successfully, but these errors were encountered: