Skip to content
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

Add a defaultIsolation static method on SwiftSetting. #8301

Merged
merged 3 commits into from
Mar 24, 2025

Conversation

hborla
Copy link
Member

@hborla hborla commented Feb 19, 2025

Add a defaultIsolation static method on SwiftSetting to allow specifying default actor isolation within a module.

Motivation:

This is part of https://forums.swift.org/t/pitch-control-default-actor-isolation-inference/77482. Please leave feedback on the API shape in the pitch thread.

Modifications:

I added a defaultIsolation case to TargetBuildSettingDescription and a corresponding static method to SwiftSetting.

Result:

Programmers will be allowed to set defaultIsolation per target in a package manifest, e.g.:

swiftSettings: [
  .enableExperimentalFeature("StrictConcurrency"),
  .defaultIsolation(MainActor.self),
]

@hborla hborla force-pushed the default-actor-isolation branch from 3eb707b to d671d1a Compare February 19, 2025 17:17
This is part of a proposal to allow specifying default actor
isolation within a module, allowing programmers to opt into
`@MainActor` isolation inference by default.
@xedin xedin force-pushed the default-actor-isolation branch from d671d1a to 392a31c Compare March 21, 2025 06:50
@xedin
Copy link
Contributor

xedin commented Mar 21, 2025

@swift-ci please test

@xedin
Copy link
Contributor

xedin commented Mar 21, 2025

@swift-ci please test Linux platform

1 similar comment
@xedin
Copy link
Contributor

xedin commented Mar 21, 2025

@swift-ci please test Linux platform

@xedin
Copy link
Contributor

xedin commented Mar 22, 2025

@swift-ci please smoke test Linux platform

@xedin
Copy link
Contributor

xedin commented Mar 22, 2025

@swift-ci please test Linux platform

@xedin xedin merged commit d99bce8 into swiftlang:main Mar 24, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants