Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix Generic materialization for type aliases #1250

Merged
merged 1 commit into from
Mar 20, 2022

Conversation

pomadchin
Copy link
Contributor

@pomadchin pomadchin commented Mar 20, 2022

The same as #1249 but against the main branch.

Closes #1248

@joroKr21
Copy link
Collaborator

The issue is here: https://github.com/milessabin/shapeless/blob/main/core/src/main/scala/shapeless/generic.scala#L880 - tpe.typeArgs is different for the type alias and doesn't match apply - this fix does the job. If we remove the typeArgs another test fails. Unfortunately that also means that custom apply methods with a different number of type arguments won't work. I will think a bit more about it but this fix is probably the best we can do.

Copy link
Collaborator

@joroKr21 joroKr21 left a comment

Choose a reason for hiding this comment

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

I can't think of a better solution. Thanks for the fix 👍

@joroKr21 joroKr21 merged commit d8516ce into milessabin:main Mar 20, 2022
@pomadchin pomadchin deleted the fix/generic branch March 20, 2022 14:06
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible derivation regression since shapeless 2.3.8
2 participants