-
-
Notifications
You must be signed in to change notification settings - Fork 101
Skip Lite: Add support for .defaultIsolation(.mainActor) #674
Copy link
Copy link
Open
Labels
projectIssues involving the structure of a Skip project, including Xcode, Gradle, Studio, fastlane and CIIssues involving the structure of a Skip project, including Xcode, Gradle, Studio, fastlane and CItranspilationIssues around transpilation from Swift to Kotlin (Skip Lite)Issues around transpilation from Swift to Kotlin (Skip Lite)
Metadata
Metadata
Assignees
Labels
projectIssues involving the structure of a Skip project, including Xcode, Gradle, Studio, fastlane and CIIssues involving the structure of a Skip project, including Xcode, Gradle, Studio, fastlane and CItranspilationIssues around transpilation from Swift to Kotlin (Skip Lite)Issues around transpilation from Swift to Kotlin (Skip Lite)
Swift 6.2 allows targets to opt into marking classes as
@MainActorby default. https://github.com/swiftlang/swift-evolution/blob/main/proposals/0466-control-default-actor-isolation.mdSwiftPM packages can opt-in to the behavior like this:
Skip Lite doesn't know anything about that. (The SwiftPM build plugin API doesn't even expose
swiftSettings.)We'd presumably need to add a
skip.ymlsetting to enable.defaultIsolation(.mainActor), and then the transpiler would need to be updated to support that.Apple's guidance is that apps/UI libraries should opt-in to
.defaultIsolation(.mainActor), but non-UI libraries should opt out. I think it would make sense to haveskip createprompt the user whether they want to use.defaultIsolation(.mainActor), defaulting to "yes" for apps, and "no" for libraries.