magro / kryo-serializers

More kryo serializers
Apache License 2.0
381 stars 120 forks source link

Kryo v5 support #128

Open wyhasany opened 3 years ago

wyhasany commented 3 years ago

Do you plan to support Kryo v5? Main readme says that you support only v2, v3, v4 versions. Is it very hard to implement v5 support?

l0rinc commented 3 years ago

Any progress with unmodifable collection support for Kryo5?

theigl commented 3 years ago

Kryo 5 can be used without problems. The Readme just doesn't reflect that.

l0rinc commented 3 years ago

Could you add an example on how to do that exactly? We ended up reimplementing all the unmodifable collection serializers for Kryo 5.

theigl commented 3 years ago

@paplorinc: What kind of issue did you have? I'm using Kryo 5 and simply call:

    UnmodifiableCollectionsSerializer.registerSerializers(kryo);
    SynchronizedCollectionsSerializer.registerSerializers(kryo);

The latest version of this project already depends on an old Kryo 5 RC so this works fine for me.

theigl commented 3 years ago

@magro: Any chance you could bump the Kryo dependency to the latest release and update the readme?

l0rinc commented 3 years ago

We depend on both version of Kryo, so we're getting: image

theigl commented 3 years ago

OK, that's bad. I guess this wasn't taken into account when the separate Kryo 5 artifact was created. This will be tough to fix.

Since unmodifable collections are part of the JDK, we could add built-in support for them to Kryo. Some of the serializers where already moved over to Kryo in the past. I don't know why these weren't included.

theigl commented 3 years ago

It seems that has been discussed a couple of times in the past:

Nate was against including any "unsafe" serializers, i.e. serializers depending on internal state of the objects not available through public APIs.

marcphilipp commented 2 years ago

Are there any updates on this?

alejandrod-f commented 1 year ago

I hope this is done soon! thanks!