-
Notifications
You must be signed in to change notification settings - Fork 531
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
Compiler hangs when using LabelledGeneric to convert classes #706
Comments
I don't think this should be an issue until you get to ~30 fields ... do you have an example of a 10 field case class where the compilation time is unacceptable? |
Ahh ... understood. I think it's highly unlikely that the compile time cost is attributable to |
I guess a macro materializer for |
A macro version |
@Atry do you have time to investigate whether |
I have issues with compilation speed with Align too, but only if the implicits could not be resolved (it took 15 minutes until I get the error). If I put the right type, then it compiles fast. Additional info: My ADT contains 12 fields and is aligned with another ADT with 7 fields (with Intersection before) |
Should be fixed by #682 - feel free to reopen otherwise. |
Hi all,
Generic and LabelledGeneric are awesome tools to "convert" classes, but unfortunately this is not true when the classes have approx. more than 10 fields. The compiler loses the track of the implicits and it hangs.
One can easily spot such behaviour by adding more fields to the example given in the Shapeless Guide and in the exercises solutions.
I was pointed to scala/scala#5649 when asking for a help on gitter and I understand that it is a work in progress, aiming to be delivered in scala 2.12.3.
For now, how to use the pattern shown in the book and in recent talks with "real world" classes?
https://github.com/underscoreio/shapeless-guide-code/tree/solutions/migrations/src/main/scala
Case Class Migration at Scala World, from Dave Gurnell
The text was updated successfully, but these errors were encountered: