Tasty Reader: Add support for Scala 3.2#10068
Merged
Merged
Conversation
bishabosha
force-pushed
the
tasty/support-scala3.2
branch
from
July 6, 2022 16:07
d80c3d0 to
4988305
Compare
lrytz
approved these changes
Jul 7, 2022
lrytz
left a comment
Member
There was a problem hiding this comment.
LGTM, needs a rebase for Jenkins to pick it up.
Scala 3.2.0 adds the scala.deriving.Mirror.fromProductTyped method to its stdlib. This method is forced by SpecializeTypes which in turn causes a chain of forces, leading to scala.Tuple being reached in an upper bound of Mirror.ProductOf. This causes an error for any code reading an enum/case-class/sealed-trait from Scala 3. So do not force any scala 3 method in this phase, as Scala 3 does not support specialisation. Alternatives include further delaying when errors are reported for problematic definitions, (i.e. do not throw TypeError), but this appeared to have more strange knock-on effects.
this is because we can get away with not forcing most annotations. Keep forcing scala.annotation.internal.Child. so a problematic annotation will stay unforced unless the user uses some macro to force all annotations on all methods.
bishabosha
force-pushed
the
tasty/support-scala3.2
branch
from
July 7, 2022 13:45
4988305 to
d7f0b8b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
supports the tasty for Scala 3.2.0 (i.e.
28.2-0)fixes scala/bug#12585
Note that the sequel PR #10127 updates this for Scala 3.2.0 final (and removes the exception for
3.2.0-RCx(28.2-1)).