Scala version compatibility [a question rather than an issue]
Zhen-hao opened this issue · 2 comments
First, feel free to close it at any time.
Before seeing this library, I had tried to use Kryo for serialization in Akka. One problem I had was that Scala collections serialized with Scala 2.11 can not be deserialized with Scala 2.12. I didn't do a deep research on it. But I got the impression that Kryo relies on the implementation of the collection libraries, which is easy to break with Scala version change.
Will the same happen if I use this library with Scala 2.13 and later move to Scala 2.14 or Scala 3?
By default the ScalaCollectionSerializer
(https://github.com/altoo-ag/akka-kryo-serialization/blob/master/src/main/scala-2.13/io/altoo/akka/serialization/kryo/serializer/scala/ScalaCollectionSerializer.scala) is used instead to serialize collections. The custom serializer does not serialize the collection itself just all the elements.
I ran a quick test and a List or ArrayBuffer are serialized exactly the same under Scala 2.12 and Scala 2.13. The same should hold true with Scala 2.14 or Scala 3 (as long as the collection class exists with the same name or is registered with the same id)
TLDR this should not happen with this library.