Hi, I have a question about the Kotlin notebook. I...
# datascience
j
Hi, I have a question about the Kotlin notebook. Is it not possible to use
kotlinx.serialization
in the kotlin notebook? I have a notebook that needs to load my application transiently to perform a task. The application loading fails with the following error when it gets to the config deserialization part. I initially thought it was an issue with version conflict with dependencies, but I excluded the dependencies in question from loading Kotlin Serialization and it is still occurring. Note that when I run the same application logic in a regular Kotlin main function, I don't get this error.
java.lang.AbstractMethodError: Receiver class ((my class name))$$serializer does not define or inherit an implementation of the resolved method 'abstract kotlinx.serialization.KSerializer[] typeParametersSerializers()' of interface kotlinx.serialization.internal.GeneratedSerializer.
Note: I am in K2 mode so the issue might be related to that. (On a side note variables are still not detected across cells in the K2 mode.)
i
Hi! Which IDE version are you running?
Could you please try it with 2025.1 EAP / Release Candidate? Situation with K2 should be way better there, and serialization is also expected to work
t
Or you can just try the 2025.1 release version: https://www.jetbrains.com/idea/whatsnew/ BTW: You can just use
%use serialization