-
Notifications
You must be signed in to change notification settings - Fork 534
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
Unsatisfiable inductive implicit search takes too long to fail #619
Comments
No, it's really not an issue with Slick! :-D |
Alrighty then! |
slick 3.2.0-M1 already has a macro |
Thanks will try it, although @milessabin still wanted me to report this issue because its a problem with shapeless that he wants to try and solve |
The new `mapTo` operator requires less boilerplate than a traditional case class mapping defined with `<>` and it can support case classes of more than 22 elements by using an HList instead of a tuple on the left-hand side. Mappings of up to 22 elements may use either one.
Hi. No plan to fix this? I recently encountered this problem. The complier hangs! |
I believe this is an issue with slickless. I blame slick for using existential phantom types 👻 See scala/bug#10420 and my comment |
Also ensure `HListShape` has the correct `ShapeLevel`. Fixes milessabin/shapeless#619
@hamidr there's very much a plan: the fix is in the compiler ... see my work on byname implicit arguments and induction heuristics. |
@milessabin in @mdedetrich's example I believe existential types are to blame. See underscoreio/slickless#20 @hamidr did you experience the exact same problem or some other instance of slow compilation times? |
Thank you folks for quick response.
and my case class:
I found out that, this particular change doesn't give an error in scalac but it prompts an error scala-typelevel.
the error itself was:
Also my build.sbt:
|
@milessabin Thanks for the "-Yinduction-heuristics". |
@hamidr indeed this looks like the exact same problem. Can you check that underscoreio/slickless#20 solves it (i.e. compilation with the wrong field should fail much faster)? Slickless is just one file that you can copy in your project. Your example has too many dependencies for me to check ATM. |
@joroKr21 it worked like a charm! thanks. |
Just for the sake of information:
|
Fixed in slickless by underscoreio/slickless#20 |
When using slick + shapeless (via the usage of slickless https://github.com/underscoreio/slickless), if you accidentally get an incorrect mapping (which can happen with really large case class) the compiler takes a REALLY long amount of time to report an error (at least 10 minutes in my personal use case)
According to @milessabin this is an issue with slick itself.
Sample project is shown below
https://github.com/mdedetrich/coffee-drinking-slow-slickless-compile
The text was updated successfully, but these errors were encountered: