According to <https://github.com/Kotlin/kotlinx.se...
# kotlinx-datetime
d
According to https://github.com/Kotlin/kotlinx.serialization/issues/1472 kotlin.time.Duration should be serializable as of 1.7.20, but I'm using 1.8.20 and I'm still getting an error. Am I doing something wrong?
Here's a screenshot showing the error:
And here's another screenshot showing that the Duration class I'm using in my project lives in Kotlin 1.8.20 (and it not annotated with serializable)
e
is there a chance it's just the IDE plugin being wrong? afaics https://github.com/JetBrains/kotlin/commit/facde26371ff683e4c4826e1a2cd2bb1104a48d0 did land in 1.7.20
(also kotlin.time.Duration is not really kotlinx-datetime)
d
I'll try to compile when I get back, in case it is a plugin issue. Apologies if this is the wrong place to post! The bug was filed and closed in the kotlinx-datetime repo which led me here. I was under the impression the one in the stdlib was forked from it?
e
was it in the kotlinx-datetime repo? the issue above is in the kotlinx.serialization repo. and afaik kotlin.time.Duration was always part of stdlib, not kotlinx-datetime, even though kotlinx.datetime does use it extensively
d
Ah looking at the bug again now, it was the kotlinx serialization repo, I'm not sure how I got confused. Been a long week, sorry about that!