chore(deps): update dependency swiftlang/swift to v5.10.1 #4543
+1
−1
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.9
->5.10.1
Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
swiftlang/swift (swiftlang/swift)
v5.10.1
: Swift 5.10.1 ReleaseCompare Source
v5.10
Compare 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
nonisolated
context. In Swift5.10, compiling the code with
-strict-concurrency=complete
produces awarning that the access must be done asynchronously:
Swift 5.10 fixed numerous other bugs in
Sendable
and 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:
Sendable
type.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 forSendable
checking, eliminating the need for@unchecked Sendable
wrapper 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=complete
in 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=complete
in 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.2
Compare Source
2023-12-11 (Xcode 15.1)
[SE-0407][]:
Member macros can specify a list of protocols via the
conformances
argument 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
Configuration
📅 Schedule: Branch creation - "after 4pm on friday,before 9am on monday,every weekend" in timezone Europe/Paris, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled because a matching PR was automerged previously.
♻ Rebasing: Whenever PR becomes conflicted, 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.