-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Change iterableFactory from val to def in ChunkLike #9703
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
Change iterableFactory from val to def in ChunkLike #9703
Conversation
|
Unfortunately Mima is not happy. I wonder if there's a way to change it in a compatible way 🤔
|
I tried adding @transient and tested it locally, but unfortunately, this solution does not resolve the Kryo issue. 😭 |
This reverts commit 8bde234.
|
Mima is complaining about the lack of a public interface ChunkLike<A> extends IndexedSeq<A>, StrictOptimizedSeqOps<A, Chunk, Chunk<A>> {
static void $init$(final ChunkLike $this) {
$this.zio$ChunkLike$_setter_$iterableFactory_$eq(.MODULE$);
}I tried adding a rogue public interface ChunkLike<A> extends IndexedSeq<A>, StrictOptimizedSeqOps<A, Chunk, Chunk<A>> {
static void $init$(final ChunkLike $this) {
}It's dirty but I think that would be okay? |
ghostdogpr
left a comment
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.
Approving but not merging yet just in case someone has a more elegant solution 😄
While using Scala version 3.6.3, ZIO version 2.1.16, and altoo-ag/scala-kryo-serialization version 1.2.0
I encountered the following error when serializing NonEmptyChunk[A] with Kryo:
This issue possibly stems from an initialization order problem.
To avoid the NullPointerException, this PR changes val to def, ensuring proper initialization.