-
Notifications
You must be signed in to change notification settings - Fork 185
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 5.10 release blog post #542
Conversation
|
||
Full data isolation in Swift 5.10 is the precursor to Swift 6. Swift 6 will enforce full data isolation by default, and we will embark upon the transition to eliminate data races across the Swift ecosystem. | ||
|
||
Read on to learn about full data isolation in Swift 5.10, new unsafe opt outs for actor isolation checking, and the remaining concurrency evolution ahead of Swift 6. |
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.
Maybe this would be where to add the call to action, possibly replacing "and the remaining concurrency evolution ahead of Swift 6." with "and how you can prepare for Swift 6 and provide feedback by enabling complete concurrency checking in your projects."
Co-authored-by: James Dempsey <dempsey@tapas-software.net>
5af6f6d
to
5fafff6
Compare
0bc68f5
to
fbc6e61
Compare
@dempseyatgithub thank you so much for the thorough constructive feedback! |
Marking as ready for review, though I'm still working through a few more bits of feedback in the introduction and next steps. |
137d653
to
3c53d70
Compare
cd814e2
to
4e3974b
Compare
95c1d62
to
bfc49d3
Compare
fa48714
to
996f3de
Compare
) | ||
``` | ||
|
||
When using Swift 6.0 tools or later, use [`SwiftSetting.enableUpcomingFeature`](https://developer.apple.com/documentation/packagedescription/swiftsetting/enableupcomingfeature(_:_:)) in the Swift settings for the given target: |
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.
When using Swift 6.0 tools or later, use [`SwiftSetting.enableUpcomingFeature`](https://developer.apple.com/documentation/packagedescription/swiftsetting/enableupcomingfeature(_:_:)) in the Swift settings for the given target: | |
When using Swift 6.0 tools or later in Swift 5 language mode, use [`SwiftSetting.enableUpcomingFeature`](https://developer.apple.com/documentation/packagedescription/swiftsetting/enableupcomingfeature(_:_:)) in the Swift settings for the given target: |
I believe it is the case that Swift 6.0 tools using Swift 6 languages mode will always have strict concurrency checking. So this flag would only be useful for Swift 5 language mode. I proposed that change to clarify for the reader.
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'll clarify this at the start of the document, because all of these instructions only apply when building with -swift-version 5
.
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.
Hmm, I already tried to say this in the intro of the document
Data-race safety in the Swift 6 language mode is designed for incremental migration. You can address data-race safety issues in your projects module-by-module, and you can enable the compiler's actor isolation and
Sendable
checking as warnings in the Swift 5 language mode, allowing you to assess your progress toward eliminating data races before turning on the Swift 6 language mode.Complete data-race safety checking can be enabled as warnings in the Swift 5 language mode using the
-strict-concurrency
compiler flag.
Do you think this is not sufficient? I understand that a lot of folks don't really understand the difference between Swift tools version vs Swift language version, but is this the right document to explain that difference?
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 don't think it would hurt to include it here for clarity. I think sometimes people skim or skip the overview and skip down to the 'how to' instructions.
I agree this isn't the right place to explain the difference between compiler version and language mode, but I think mentioning it here lets readers know it exists.
There should be an entry added to the Articles section of If time is of the essence, this could be done as a follow-on PR after the initial posting.
|
@swift-ci test |
* Add a draft of the 5.10 release blog post. * Grammar correction: opt out -> opt-out Co-authored-by: James Dempsey <dempsey@tapas-software.net> * Improve the structure of the introduction. * Explain why unsafe opt-outs are important. * Add a link to instructions for enabling complete concurrency checking. * Improve the Next Steps section. * Separate out the content on language evolution ahead of Swift 6 from the next steps. * Provide more context about data races in the introduction. * Improve the instructions for enabling strict concurrency in SwiftPM. * Add a few more explanations to the code examples in the data race safety section. * Clarify that the Swift 6 language mode is opt-in in the intro. * Correct the name of the Xcode build setting for strict concurrency. * Editorial pass * Update the `nonisolated(unsafe)` code example to avoid a compiler bug. * Update the date for the blog post --------- Co-authored-by: James Dempsey <dempsey@tapas-software.net> Co-authored-by: Mishal Shah <shahmishal@users.noreply.github.com>
No description provided.