with kotlin 1.3.50 and serialization 0.12.0 the fo...
# serialization
n
with kotlin 1.3.50 and serialization 0.12.0 the following code stopped working:
Copy code
@Serializable
data class SomeClass(
    var aInt: Int = 5
) {
    @Transient
    lateinit var rootDir: File
}
this fails with:
This property is marked as @Transient and therefore must have an initializing expression
the rootDir is in this case the full path to the workingdirectory on the users machine, it should not be serialized, it gets set first thing after deserialization but it seems that is no longer allowed
🤔 2
s
what do you mean by "transient disallow lateinit" ?
ah, I see
yes, it is probably a bug
n
should i create a issue on github to track this? or can i use serialization 0.11.0 with kotlin 1.3.50 ? (i assume not)
s
Yeah, please create an issue. This is a compiler plugin bug, so rolling back to 1.3.41 should help
n
https://github.com/Kotlin/kotlinx.serialization/issues/553 i also included a selfcontained repro that should demonstrate the usecase and problem
🙏 1