From 1b79cdc4c3940e1f77934194c6271846f38bff99 Mon Sep 17 00:00:00 2001 From: Pavel Yaskevich Date: Fri, 9 May 2025 11:52:29 -0700 Subject: [PATCH 1/2] [Diagnostics] Rename the note file to match the `NonisolatedNonsendingByDefault` feature group declaration (cherry picked from commit fbaf7ce0170331501ba7208d04034893b3b1c5ae) --- ...c-caller-execution.md => nonisolated-nonsending-by-default.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename userdocs/diagnostics/{async-caller-execution.md => nonisolated-nonsending-by-default.md} (100%) diff --git a/userdocs/diagnostics/async-caller-execution.md b/userdocs/diagnostics/nonisolated-nonsending-by-default.md similarity index 100% rename from userdocs/diagnostics/async-caller-execution.md rename to userdocs/diagnostics/nonisolated-nonsending-by-default.md From 6c54fe142a1b8c47853baed248fab375612f9ca4 Mon Sep 17 00:00:00 2001 From: Pavel Yaskevich Date: Fri, 9 May 2025 13:02:58 -0700 Subject: [PATCH 2/2] [Diagnostics] Replace last references to `AsyncCallerExecution` with `NonisolatedNonsendingByDefault` (cherry picked from commit 0bcbde4940ebe2f49776e30fa6d5c29b153446f1) --- test/Concurrency/nonisolated_inherits_isolation.swift | 2 +- userdocs/diagnostics/nonisolated-nonsending-by-default.md | 6 +++--- userdocs/diagnostics/sending-risks-data-race.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/Concurrency/nonisolated_inherits_isolation.swift b/test/Concurrency/nonisolated_inherits_isolation.swift index 1996ad4cb4567..ec1e6d8211d84 100644 --- a/test/Concurrency/nonisolated_inherits_isolation.swift +++ b/test/Concurrency/nonisolated_inherits_isolation.swift @@ -5,7 +5,7 @@ // REQUIRES: concurrency // REQUIRES: swift_feature_NonisolatedNonsendingByDefault -// This test checks and validates that when AsyncCallerExecution is enabled, we emit the +// This test checks and validates that when NonisolatedNonsendingByDefault is enabled, we emit the // appropriate diagnostics. It also runs with the mode off so we can validate // and compare locally against the normal errors. diff --git a/userdocs/diagnostics/nonisolated-nonsending-by-default.md b/userdocs/diagnostics/nonisolated-nonsending-by-default.md index fea7c70b4b94b..9d44276e3d604 100644 --- a/userdocs/diagnostics/nonisolated-nonsending-by-default.md +++ b/userdocs/diagnostics/nonisolated-nonsending-by-default.md @@ -1,4 +1,4 @@ -# `AsyncCallerExecution` +# `NonisolatedNonsendingByDefault` Proposed in [SE-0461], this feature changes the behavior of nonisolated async functions to run on the actor to which the caller is isolated (if any) by @@ -9,9 +9,9 @@ This feature was proposed in [SE-0461](https://github.com/swiftlang/swift-evolut * The `@concurrent` attribute specifies that a function must always switch off of an actor to run. - This is the default behavior without `AsyncCallerExecution`. + This is the default behavior without `NonisolatedNonsendingByDefault`. * The `nonisolated(nonsending)` modifier specifies that a function must always run on the caller's actor. - This is the default behavior with `AsyncCallerExecution`. + This is the default behavior with `NonisolatedNonsendingByDefault`. [SE-0461]: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0461-async-function-isolation.md diff --git a/userdocs/diagnostics/sending-risks-data-race.md b/userdocs/diagnostics/sending-risks-data-race.md index 2e6247b05756e..97d58925c0025 100644 --- a/userdocs/diagnostics/sending-risks-data-race.md +++ b/userdocs/diagnostics/sending-risks-data-race.md @@ -49,4 +49,4 @@ func onMainActor(person: Person) async { This eliminates the risk of data-races because `printNameConcurrently` continues to run on the main actor, so all access to `person` is serialized. -You can also enable the `AsyncCallerExecution` upcoming feature to make `nonisolated(nonsending)` the default for async functions on non-`Sendable` types. +You can also enable the `NonisolatedNonsendingByDefault` upcoming feature to make `nonisolated(nonsending)` the default for async functions on non-`Sendable` types.