Feature request: Sendable conformance #48
russellporter
started this conversation in
Ideas
Replies: 3 comments 3 replies
|
@russellporter you can use You won't need to extend your DataClass with Sendable but some cases still need some migration from SKIE (async/await) or Kotlin cinterop itself. |
2 replies
|
Also, the ability to mark closures as |
0 replies
|
This should be doable on the objc side with the macro I also added a feature request here: |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We've been looking at enabling stronger concurrency checking in our Swift codebase, to help spot issues and get ready for Swift 6. We have many immutable data classes in our KMP library which we assume are safe to be marked as
@unchecked Sendable.Currently we annotate the KMP types from our Swift codebase. However it is far away from the type declaration in Kotlin, which makes it fragile. For example:
It seems like SKIE potentially could help a lot here:
@UncheckedSendableannotation for kotlin types. Being able to declare it directly on the type in Kotlin code would make the API contract more explicit.Sendable. I couldn't find a way to do this yet.@CheckedSendableannotation for kotlin types. This would provide a compile time guarantee that a kotlin type is fully Sendable, similar to how Swift compiler does it. I assume this is very hard if not impossible.All reactions