Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork142
BigIntOptionAnyValHolder in AnyValSerializerTest fails in scala 2.11 and scala 3.3#675
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:2.18
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
pjfanning commentedMay 23, 2024
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. |
jtjeferreira commentedMay 23, 2024
You are right. If I use scala 3.3.3 scala 2.13 |
jtjeferreira commentedMay 23, 2024
I think thisticket might be related... |
jtjeferreira commentedMay 23, 2024
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. |
pjfanning commentedMay 23, 2024
@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. |
jtjeferreira commentedJul 22, 2024
this should befixed in 3.3.4-RC1. I will give it a try in the next days... |
jtjeferreira commentedJul 22, 2024
@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 ;) ? |
pjfanning commentedJul 22, 2024
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. |
jtjeferreira commentedJul 22, 2024
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