-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Investigation in Scala2/Scala3 decoder inconsistency #437
Investigation in Scala2/Scala3 decoder inconsistency #437
Conversation
I created a very simple case class IndexedStateT:
However, when applying I would have expected a |
@GerretS @alycklama Thank you both for the investigation and debugging, your work has indeed proven useful for fixing! I just pushed some commits that
It still fails for the test case with default value, but at least with correct error message. The underlying problem is more complex, the Scala 3 compiler for long did not allow to get default parameter values and AFAIK still has terrible UX nowadays as in you need As the functionality of the test cases I didn't rewrite is more concisely covered by the existing test cases, I would remove those and then merge this PR – if that's fine for you? |
Thanks for the fixes! No, I don't think we'll need support for defaults, so we can go forward for now. I only noticed that situation by accident. It was the different handling of missing values that was causing trouble for us. Feel free to clean up my test cases if they're already covered elsewhere, I didn't put too much thought into them other than to quickly demonstrate the issue. |
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.
Thanks for the bug hunt and the fix!
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.
Do not merge right now, doing some work to rebase it.
ebcef92
to
a3cafaa
Compare
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.
Ok this can now be merged. Thanks again.
…ala 2 and Scala 3.
a3cafaa
to
dc0119d
Compare
@alycklama and I noticed in #436 that certain built-in decoders have inconsistent behaviour between Scala 2 and 3.
Since this inconsistency is unrelated to our PR, we decided to make a separate issue to investigate this.
I think it is related to the Shapeless types used in the
MapShapedCsvRowDecoder
, since Shapeless makes heavy use of Macros which have changed in Scala 3. However, that is where my knowledge of Shapeless ends.This PR adds a few unit tests that demonstrate the problem. They succeed on Scala 2 and fail on Scala 3.