-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Adopt Swift 6 and audit for Sendable #5000
Adopt Swift 6 and audit for Sendable #5000
Conversation
I'm not sure how reviewable this is. It is the result of repeated iteration and small fixes. |
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.
I just did a quick skim since as you mentioned it's a large patch that's not easily reviewable, but I did catch one thing that might be worth double checking
0240cd7
to
c5f3634
Compare
@swift-ci please test |
@swift-ci test |
swiftlang/swift-foundation#742 |
@Azoy the linked PR only fixed the Synchronization import for |
e04a8f8
to
203ed95
Compare
@swift-ci test |
1 similar comment
@swift-ci test |
… in both Swift and C code
…the CF type inside the lock
203ed95
to
5cb2337
Compare
@swift-ci test |
d3e3766
to
c2bc79a
Compare
@swift-ci test |
@swift-ci test |
@swift-ci test windows |
* Adopt Sendable, fix Sendable related warnings, and fix other warnings in both Swift and C code * Upgrade to Swift 6 - Fix associated warnings * Remove Sendable annotation from NSAffineTransform * Cleanup some unused types in Utilities and use a Mutex instead of NSLock * Remove some warnings for Windows builds * Add version 6 and warning flags to CMake file * Adapt to some changes in how unchecked Sendable conformance is declared * Update swift-foundation dependency * Update locking strategy for DateFormatter and NumberFormatter - keep the CF type inside the lock * Add annotations for Core and CFSocketRef * Resolve a warning in TestDecimal * Use noncopyable State type for DateFormatter and NumberFormatter * Mark DirectoryEnumerator as non-Sendable * Work around compiler crashes when using ~Copyable types * Clarify comment of _nonSendable with a message explaining the remaining warning
* Adopt Sendable, fix Sendable related warnings, and fix other warnings in both Swift and C code * Upgrade to Swift 6 - Fix associated warnings * Remove Sendable annotation from NSAffineTransform * Cleanup some unused types in Utilities and use a Mutex instead of NSLock * Remove some warnings for Windows builds * Add version 6 and warning flags to CMake file * Adapt to some changes in how unchecked Sendable conformance is declared * Update swift-foundation dependency * Update locking strategy for DateFormatter and NumberFormatter - keep the CF type inside the lock * Add annotations for Core and CFSocketRef * Resolve a warning in TestDecimal * Use noncopyable State type for DateFormatter and NumberFormatter * Mark DirectoryEnumerator as non-Sendable * Work around compiler crashes when using ~Copyable types * Clarify comment of _nonSendable with a message explaining the remaining warning
This patch:
Sendable
annotation, and adds a flag to require all future types to do so as wellnoasync
functionsnonisolated(unsafe)
. This should be considered a short term workaround and not a design pattern. In the future, adding these will be disfavored and rightfully proving to the compiler that it is safe will be preferred. However, it's not practical to do all of that in one shot.Synchronization
types and more annotations.