Closed mvarnagiris closed 11 months ago
Thanks for raising! This issue is being tracked in: https://youtrack.jetbrains.com/issue/KT-58892.
Thanks for speedy response. I was not aware of that ticket. Feel free to close this 🙇
Unfortunately, KT-58892 has been closed "As Designed", which means we'll have to migrate to `kotlinx-serialization".
Oh interesting. So the whole Parcelable thing will be replaced with serialization then? Seems like a huge change. I guess this will also affect Decompose.
Yes. Basically, the following feature will not work in K2.
// commonMain
expect annotation class Parcelize
expect interface Parcelable
// androidMain
actual typealias Parcelize = kotlinx.parcelize.Parcelize
actual typealias Parcelable = android.os.Parcelable
The API will have to change, but fortunately it should look very similar to the current one. Plus, it will be fully multiplatform.
Ideally, we would need a stable Efficient Binary Format in kotlinx-serialization
. Filed https://github.com/Kotlin/kotlinx.serialization/issues/2428.
Fixed in #115.
Released in v1.3.0-alpha01
.
@arkivanov it seems Kotlin-parcelize was updated to allow using it from the common code, are there any plans for restoring the support for Parcelable now?
I'm asking just to decide if I should start working on the migration to @Serializable
or if I should postpone it.
Indeed, Parcelize can now be used from the common code. However, I really like how kotlinx-serialization
works and supports all platforms. There are no plans to go back to Parcelize for now.
With K2 compiler coming it would be good to make this library work with it too. Right now I'm getting this error:
K2 compiler enabled via
kotlin.experimental.tryK2=true
ingradle.properties