-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Correct Java signature for value classes appearing in type arguments #20463
Conversation
@jtjeferreira It seems the corresponding code in scala3 is corresponds to |
Thanks for the pointer |
@lrytz I think I got the port applied correctly, but scalajs tests are failing with :
any hints? |
after reading https://www.scala-js.org/doc/project/linking-errors.html#using-unsupported-jdk-libraries-possibly-transitively and earlier output of the tests I think the problem is due to the usage of I think we need to disable this test for scalajs. Should I move it to a different folder? |
It seems all tests in scala3/sjs-compiler-tests/test/scala/dotty/tools/dotc/ScalaJSCompilationTests.scala Line 62 in c6fbe6f
Someone else will know better than me where to put the test (eg @bishabosha). |
You should keep it there. You can ignore a test on Scala.js like this: scala3/tests/run/t8905/Test.java Line 1 in c6fbe6f
|
This is ready for review. Let me know if I should update the PR description and/or squash commits. Also as discussed here, should this backported to LTS? |
@lrytz @SethTisue this is ready for review |
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.
LGTM, thank you! Could you squash all the changes into a single commit with a bit of a cleaned up commit message?
As suggested in scala#10846 the fix to this issue should be to port scala/scala#8127 to scala3
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.
Thank you!
This will be available in which release? Shall I try to back port it to older releases? |
It will go in 3.6 and likely in some 3.3.x release unless the backport proves problematic. Backports are done in batches and in order of original merge, so it wouldn't actually be helpful to submit an explicit backport PR. |
As suggested in #10846 the fix to this issue should be to port scala/scala#8127 to scala3
I started by adding the same tests as in the scala2 PR and then tried to find the place where to do the fix by adding some log traces. Unfortunately I am still pretty lost because this is my first time looking at the compiler code.
Any tips where this needs to be fixed are very welcome. Meanwhile a few questions:
src/compiler/scala/tools/nsc/transform/Erasure.scala
, should I do the fix for scala3 incompiler/src/dotty/tools/dotc/transform/Erasure.scala
as well?ErasedValueType
, either when it is created (inTypeErasure#eraseDerivedValueClass
) or when it is used (inErasure#unbox
).Please also send me any pointers besides https://dotty.epfl.ch/docs/contributing/index.html regarding compiler contributions