Skip to content
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

Tasty Reader: Add support for Scala 3.2 #10068

Merged
merged 7 commits into from Jul 11, 2022

Conversation

bishabosha
Copy link
Member

@bishabosha bishabosha commented Jul 6, 2022

supports the tasty for Scala 3.2.0 (i.e. 28.2-0)

  • Added support for the new constructor encoding in TASTy.
  • Stops forcing Scala 3 methods in SpecializeTypes
  • Reduces how many annotations are forced so that problematic API's are not forced accidentally when the user never accesses them.

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)).

@scala-jenkins scala-jenkins added this to the 2.13.10 milestone Jul 6, 2022
@bishabosha bishabosha changed the title Tasty Reader support Scala 3.2 Tasty Reader support Scala 3.2 [ci: last-only] Jul 6, 2022
@SethTisue SethTisue modified the milestones: 2.13.10, 2.13.9 Jul 6, 2022
@SethTisue SethTisue added the prio:blocker release blocker (used only by core team, only near release time) label Jul 6, 2022
Copy link
Member

@lrytz lrytz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Jul 11, 2022
@SethTisue SethTisue merged commit aa579da into scala:2.13.x Jul 11, 2022
@SethTisue SethTisue removed the prio:blocker release blocker (used only by core team, only near release time) label Jul 11, 2022
@SethTisue SethTisue changed the title Tasty Reader support Scala 3.2 [ci: last-only] Tasty Reader: Add support for Scala 3.2 Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes worth highlighting in next release notes tastyreader
Projects
None yet
5 participants