-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add kotlin.serialization implementation of Serializer #338
Conversation
Looks great from quickly going through it, I'll try to review it this week. |
Great approach. We are working on a kotlinx.serialization based avro serializer as well and might (re-)use generic features provided by extension-kotlin. |
This implementation is already independent of the serialization format. I changed the main dependency to use the core library instead and added a few more tests for binary formats as well. It should work with any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some questions about Axon Specific classes that needs to be serialized, which are not included in the SerializersModule
. All new files should have the copyright notice. It would also be nice if we don't need to opt in for experimental api's. As this is a new feature, it's likely better to set 4.10 as the target.
kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/serialization/AxonSerializers.kt
Outdated
Show resolved
Hide resolved
kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/serialization/AxonSerializers.kt
Show resolved
Hide resolved
kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/serialization/AxonSerializers.kt
Show resolved
Hide resolved
kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/serialization/AxonSerializers.kt
Show resolved
Hide resolved
We were playing with But before building this, it would be a good idea to document how new KSerializers needs to be registered. In general, do you have any docs describing the implemented features? |
Actually, this part is already public/released ... peek here if you like: https://github.com/toolisticon/avro-kotlin/tree/develop/avro-kotlin-serialization/src/main/kotlin/spi |
kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/serialization/ArrayResponseType.kt
Show resolved
Hide resolved
kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/serialization/AxonSerializers.kt
Show resolved
Hide resolved
kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/serialization/AxonSerializers.kt
Show resolved
Hide resolved
kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/serialization/AxonSerializers.kt
Show resolved
Hide resolved
kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/serialization/AxonSerializers.kt
Show resolved
Hide resolved
kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/serialization/KotlinSerializer.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, although I have a couple of questions and remarks.
Move ArrayResponseType to message/responsetypes. In doing so, we reflect the folder structure for the other ResponseType implementation in Axon Framework #338
Expand KDoc with construction example #338
This PR adds support for serializing by using
kotlinx.serialization
and is basically a continuation of #124.Note that I had to upgrade the Kotlin version (and fix a few generics in
QueryGatewayExtensions.kt
) to make it work.