-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A custom serializer class requires serializers for non-serializable fields with version of kotlin 1.8.20. #2260
Labels
Comments
If you use |
sandwwraith
added a commit
to JetBrains/kotlin
that referenced
this issue
Apr 6, 2023
Creation of this property in the SerializerIrGenerator.<init> can lead to a 'Serializer not found' internal error when generator is applied to a fully-customized external serializer. In that case, generator is still created, but none of the generateSave/Load functions are called, so cacheableChildSerializers(Property) is not necessary. #KT-57730 Fixed Fixes Kotlin/kotlinx.serialization#2260
sandwwraith
added a commit
to JetBrains/kotlin
that referenced
this issue
Apr 17, 2023
Creation of this property in the SerializerIrGenerator.<init> can lead to a 'Serializer not found' internal error when generator is applied to a fully-customized external serializer. In that case, generator is still created, but none of the generateSave/Load functions are called, so cacheableChildSerializers(Property) is not necessary. #KT-57730 Fixed Fixes Kotlin/kotlinx.serialization#2260
KotlinBuild
pushed a commit
to JetBrains/kotlin
that referenced
this issue
Apr 18, 2023
Creation of this property in the SerializerIrGenerator.<init> can lead to a 'Serializer not found' internal error when generator is applied to a fully-customized external serializer. In that case, generator is still created, but none of the generateSave/Load functions are called, so cacheableChildSerializers(Property) is not necessary. #KT-57730 Fixed Fixes Kotlin/kotlinx.serialization#2260
sandwwraith
added a commit
to JetBrains/kotlin
that referenced
this issue
Apr 18, 2023
Creation of this property in the SerializerIrGenerator.<init> can lead to a 'Serializer not found' internal error when generator is applied to a fully-customized external serializer. In that case, generator is still created, but none of the generateSave/Load functions are called, so cacheableChildSerializers(Property) is not necessary. #KT-57730 Fixed Fixes Kotlin/kotlinx.serialization#2260 (cherry picked from commit d9e16fb)
KotlinBuild
pushed a commit
to JetBrains/kotlin
that referenced
this issue
Apr 19, 2023
Creation of this property in the SerializerIrGenerator.<init> can lead to a 'Serializer not found' internal error when generator is applied to a fully-customized external serializer. In that case, generator is still created, but none of the generateSave/Load functions are called, so cacheableChildSerializers(Property) is not necessary. #KT-57730 Fixed Fixes Kotlin/kotlinx.serialization#2260 (cherry picked from commit d9e16fb)
Fixed in Kotlin 1.8.20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I have a base class (BaseApiResponse) for http responses and custom serializer (BaseApiResponseSerializer) for deserialize responses into this base api class. This class has a few fields and one field of them is not serializable (Throwable).
I have updated kotlin version to 1.8.20 and my project is no longer compiling with an error.
Message of error
As you can see, the main cause is that the serializer is for an element of type kotlin.Throwable? was not found.
But this code compiles successfully with version of kotlin 1.8.10
Expected behavior
I think as long as I provide my custom serializer, I shouldn't have such compilation issues.
Environment
os - macOS Ventura (version 13.2.1),
jre - java 11.0.13
The text was updated successfully, but these errors were encountered: