Skip to content

Commit 1d9a8f6

Browse files
authored
adds documentation to define the default value for target isolation (#8823)
adds documentation to define the default value for target isolation ### Motivation: Following up from [my question in the Swift Forums about the default value for "isolation mode"](https://forums.swift.org/t/what-is-the-default-isolation-mode-for-swift-packages-6-2/80453) for Swift packages. The default is defined in the [proposal SE-0466](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0466-control-default-actor-isolation.md), but wasn't reflected in PackageDescription documentation. ### Modifications: Updated the documentation for `defaultIsolation` to describe the default. ### Result: PackageDescription documentation reflects the default choice if unspecified or set to `nil`
1 parent 1335dd3 commit 1d9a8f6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/PackageDescription/BuildSettings.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,9 @@ public struct SwiftSetting: Sendable {
472472
/// inference. The only valid arguments are `MainActor.self` and `nil`.
473473
/// - condition: A condition that restricts the application of the build
474474
/// setting.
475+
///
476+
/// The compiler defaults to inferring unannotated code as `nonisolated` if unspecified,
477+
/// or if the `isolation` parameter is set to `nil`.
475478
@available(_PackageDescription, introduced: 6.2)
476479
public static func defaultIsolation(
477480
_ isolation: MainActor.Type?,

0 commit comments

Comments
 (0)