Shapeless 2.3.5+ can't provide implicit for Generic.Aux
ivashin opened this issue · comments
After updating to Shapeless 2.3.5+ some code that used to work with 2.3.3 stopped compiling.
A minimal example is:
import shapeless._
trait A
trait B[+A1 <: A]
case class C[T]()
case class D[A1 <: A, B1 <: B[A1]](c: C[B1]) {
def bind() = D.bind(this)
}
object D {
def bind[T, L <: HList](t: T)(implicit gen: Generic.Aux[T, L]) = ???
}
It fails to compile with the following error:
shapeless.this.Generic.materialize is not a valid implicit value for shapeless.Generic.Aux[D[A1,B1],L] because:
hasMatchingSymbol reported error: inferred type arguments [Nothing,B1] do not conform to method apply's type parameter bounds [A1 <: A,B1 <: B[A1]]
Looks like #1191 also fixes my problem. I wonder, are there any plans for a 2.3.8 patch release?
Looks like #1191 also fixes my problem. I wonder, are there any plans for a 2.3.8 patch release?
Cool, thanks for checking 👍
I wonder, are there any plans for a 2.3.8 patch release?
Yes, it's long overdue. I should have some time to do it next weekend. Will probably need to backport some PRs from the main branch first.
Yes, it's long overdue. I should have some time to do it next weekend. Will probably need to backport some PRs from the main branch first.
Awesome! I just double checked: my example compiles both in 2.12 and 2.13 with #1191 applied to v2.3.7. I guess this issue can be closed now.
Sorry, I didn't manage - personal life got in the way 😄