-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
BigIntOptionAnyValHolder in AnyValSerializerTest fails in scala 2.11 and scala 3.3 #675
base: 2.18
Are you sure you want to change the base?
Conversation
Thanks @jtjeferreira I suspect that we will need to add a new serializer and deserializer that tries to handle AnyVal explicitly and in a way that tries to standardise what happens across all supported Jackson versions. This may not necessarily be easy. In the end of the day, jackson-module-scala and its reliance on Java Reflection at runtime is always going to struggle to support all Scala use cases across all Scala versions. |
You are right. If I use scala 3.3.3
scala 2.13
|
I think this ticket might be related... |
scala/scala#8127 was merged in scala 2.12.9. If I run the test with scala 2.12.8 it fails with the ClassCastException. If I run with 2.12.9 it works. |
@jtjeferreira Thanks for the research. If you are stuck and need a solution that works with existing versions of Jackson - Jackson serialization/deserlization is quite customizable. There are Jackson annotations that you can add to classes and their methods and fields. You could also create a custom serializer and/or deserializer and register it with your mapper. |
this should be fixed in 3.3.4-RC1. I will give it a try in the next days... |
@pjfanning this is fixed for scala3, but still fails for scala 2.11 (as expected). Should I move this test to a different test folder or should we drop scala 2.11 support ;) ? |
Thanks @jtjeferreira - there will be a Jackson 2.18.0-RC1 release within the next few weeks so I don't want to complicate that by having the Scala 3 build with an RC version of Scala. When Scala 3.3.4 is released, I'll merge this or something similar. |
fair enough. Actually I don't think the upgrade of scala version is necessary in this library, as it should be enough to upgrade application (i.e code that makes use of AnyVal) |
This test fails in scala 2.11 and scala 3.3 with the follwoing error