Update dependency swiftlang/swift to v5.10.1 #99
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 contains the following updates:
5.8->5.10.1Release Notes
swiftlang/swift (swiftlang/swift)
v5.10.1: Swift 5.10.1 ReleaseCompare Source
v5.10Compare Source
2024-03-05 (Xcode 15.3)
Swift 5.10 closes all known static data-race safety holes in complete strict
concurrency checking.
When writing code against
-strict-concurrency=complete, Swift 5.10 willdiagnose all potential for data races at compile time unless an explicit
unsafe opt out, such as
nonisolated(unsafe)or@unchecked Sendable, isused.
For example, in Swift 5.9, the following code crashes at runtime due to a
@MainActor-isolated initializer being evaluated outside the actor, but itwas not diagnosed under
-strict-concurrency=complete:The above code admits data races because a
@MainActor-isolated staticvariable, which evaluates a
@MainActor-isolated initial value upon firstaccess, is accessed synchronously from a
nonisolatedcontext. In Swift5.10, compiling the code with
-strict-concurrency=completeproduces awarning that the access must be done asynchronously:
Swift 5.10 fixed numerous other bugs in
Sendableand actor isolationchecking to strengthen the guarantees of complete concurrency checking.
Note that the complete concurrency model in Swift 5.10 is conservative.
Several Swift Evolution proposals are in active development to improve the
usability of strict concurrency checking ahead of Swift 6.
[SE-0412][]:
Global and static variables are prone to data races because they provide memory that can be accessed from any program context. Strict concurrency checking in Swift 5.10 prevents data races on global and static variables by requiring them to be either:
Sendabletype.For example:
A new
nonisolated(unsafe)modifier can be used to annotate a global or static variable to suppress data isolation violations when manual synchronization is provided:nonisolated(unsafe)can be used on any form of storage, including stored properties and local variables, as a more granular opt out forSendablechecking, eliminating the need for@unchecked Sendablewrapper types in many use cases:Note that without correct implementation of a synchronization mechanism to achieve data isolation, dynamic run-time analysis from exclusivity enforcement or tools such as the Thread Sanitizer could still identify failures.
[SE-0411][]:
Swift 5.10 closes a data-race safety hole that previously permitted isolated
default stored property values to be synchronously evaluated from outside the
actor. For example, the following code compiles warning-free under
-strict-concurrency=completein Swift 5.9, but it will crash at runtime atthe call to
MainActor.assertIsolated():This happens because
requiresMainActor()is used as a default argument tothe member-wise initializer of
S, but default arguments are alwaysevaluated in the caller. In this case, the caller runs on the generic
executor, so the default argument evaluation crashes.
Under
-strict-concurrency=completein Swift 5.10, default argument valuescan safely share the same isolation as the enclosing function or stored
property. The above code is still valid, but the isolated default argument is
guaranteed to be evaluated in the callee's isolation domain.
v5.9.2Compare Source
2023-12-11 (Xcode 15.1)
[SE-0407][]:
Member macros can specify a list of protocols via the
conformancesargument to the macro role. The macro implementation will be provided with those protocols that are listed but have not already been implemented by the type to which the member macro is attached, in the same manner as extension macros.v5.9.1: Swift 5.9.1 ReleaseCompare Source
v5.9Compare Source
2023-12-11 (Xcode 15.1)
[SE-0407][]:
Member macros can specify a list of protocols via the
conformancesargument to the macro role. The macro implementation will be provided with those protocols that are listed but have not already been implemented by the type to which the member macro is attached, in the same manner as extension macros.v5.8.1: Swift 5.8.1 ReleaseCompare Source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.