Skip to content

Fix 2.13.9 regression which broke binary compatibility of case classes which are also value classes#10155

Merged
lrytz merged 1 commit into
scala:2.13.xfrom
som-snytt:issue/12650-missing-product-extension
Sep 26, 2022
Merged

Fix 2.13.9 regression which broke binary compatibility of case classes which are also value classes#10155
lrytz merged 1 commit into
scala:2.13.xfrom
som-snytt:issue/12650-missing-product-extension

Conversation

@som-snytt

@som-snytt som-snytt commented Sep 23, 2022

Copy link
Copy Markdown
Contributor

Fixes scala/bug#12650, reverts #10002

@scala-jenkins scala-jenkins added this to the 2.13.10 milestone Sep 23, 2022
@SethTisue SethTisue added the prio:blocker release blocker (used only by core team, only near release time) label Sep 23, 2022
@joroKr21

Copy link
Copy Markdown
Member

Instead of full revert can we only add it to AnyVals?

@som-snytt

Copy link
Copy Markdown
Contributor Author

@joroKr21 That's an idea, if one were suitably motivated. However, the goal of the previous PR was to simplify. On the upside, "Fixed in Scala 3."

Invoking the trait method is marginally better than the method on module ScalaRunTime.

The value class gets to call the extension method on its companion, where it is boxed and sent to ScalaRunTime. It could just Iterator.single(productElement(0)).

@lrytz lrytz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Value classes agian... I agree to revert the change, at least as a first step. Thank you @som-snytt

@lrytz lrytz merged commit 8c6b49b into scala:2.13.x Sep 26, 2022
@som-snytt som-snytt deleted the issue/12650-missing-product-extension branch September 26, 2022 14:45
@SethTisue SethTisue added release-notes worth highlighting in next release notes and removed prio:blocker release blocker (used only by core team, only near release time) labels Sep 29, 2022
@SethTisue SethTisue changed the title Revert using mixin productIterator for case class Fix regression in 2.13.9 which broke binary compatibility of case classes which are also value classes Oct 8, 2022
@SethTisue SethTisue changed the title Fix regression in 2.13.9 which broke binary compatibility of case classes which are also value classes Fix 2.13.9 regression which broke binary compatibility of case classes which are also value classes Oct 8, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2.13.9] productIterator change to case classes breaks bincompat if the class is also a value class

5 participants