-
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
Possible derivation regression since shapeless 2.3.8 #1248
Comments
I tried to narrow the example more: import shapeless.{Generic, HList}
case class TX2[A, B](a: A, b: B)
case class TX3[A, B, C](a: A, b: B, c: C)
def tx2[A, B](data: TX2[A, B])(implicit g: Generic[TX2[A, B]]): Unit = {}
tx2(TX2[Int, Boolean](1, true))
type TTX3[A, B] = TX3[Long, Int, TX2[A, B]]
def tx3[A, B](data: TTX3[A, B])(implicit g: Generic[TTX3[A, B]]): Unit = {}
// compiles with shapeless <= 2.3.7
// could be fixed for 2.3.8 by removing the type alias
// def tx3[A, B](data: TTX3[A, B])(implicit g: Generic[TX3[Long, Int, TX2[A, B]]]): Unit = {}
tx3(TX3(1L, 1, TX2(1, true))) Scastie: https://scastie.scala-lang.org/pomadchin/D46I0pY3TuegOXIqicrZkg/9 |
Thanks for the report. We might be missing a |
@joroKr21 that was indeed it! Thanks! |
This was referenced Mar 20, 2022
12 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The shapeless 2.3.8 dependency update caused frameless test compilation failure, you can find the PR and the CI failure here: typelevel/frameless#612
I decided to go investigate it a little and to prepare a scoped example of the code that causes compilation errors, it looks like it may be related to the
type alias
resolution andGeneric
derivation:Code example, function fooPrintT compiles with Shapeless <= 2.3.7 but not with 2.3.8
build.sbt
Compilation error
Scastie (downgrade shapeless to see that compilation works)
https://scastie.scala-lang.org/pomadchin/Q8XBuPBVTTajvomVe3YZfQ/5
The text was updated successfully, but these errors were encountered: