Skip to content

Support Mirror for generic tuples arity > 22 #23363

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eejbyfeldt
Copy link

fixes #15398

@eejbyfeldt eejbyfeldt marked this pull request as ready for review June 14, 2025 04:46

summon[Tuple.Size[Tuple23] =:= 23]
val m = summon[scala.deriving.Mirror.Of[Tuple23]]
summon[m.MirroredLabel =:= "Tuple23"]
Copy link
Member

@bishabosha bishabosha Jun 14, 2025

Choose a reason for hiding this comment

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

I guess this is the main bike-shedding moment - i.e. should it include arity, or just Tuple (or another variant) - i.e. case class can evolve over time to add new fields but its MirroredLabel doesn't change - so I dont think unique label is necessary.

Copy link
Member

Choose a reason for hiding this comment

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

should also update the docs (or create an issue to) for Mirror generation here https://www.scala-lang.org/api/3.7.1/docs/docs/reference/contextual/derivation.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to support Mirrors for Generic Tuples arity +22
2 participants