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

Fix build error for SE-0401 #183

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

kitwtnb
Copy link
Contributor

@kitwtnb kitwtnb commented Jul 25, 2024

In SE-0401 , which will take effect in Swift 6, types with @StateObject will no longer be MainActor.
@StateObject must be referenced from MainActor or a build error will occur, so @MainActor is added.
https://github.com/swiftlang/swift-evolution/blob/main/proposals/0401-remove-property-wrapper-isolation.md

@sindresorhus
Copy link
Owner

This will cause a warning on update() and I'm not yet sure how to fix that. I would have assumed DynamicProperty requirements would be marked @MainActor, but they are not.

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.

2 participants