It seems the @newtype annotation from the scala-newtype library doesn't work well with the @derive annotation.
This fails to compile:
@newtype
@derive(show)
case class Foo(value: String)
@newtype
@derive(show)
case class Bar(value: Int)
@derive(show)
final case class Ctx(foo: Foo, bar: Bar)
Here's the error:
[error] /examples/foo.scala:19:4: magnolia: could not find Show.Typeclass for type examples..Foo
[error] in parameter 'foo' of product type examples.Ctx
[error] @derive(show)
[error] ^
[error] one error found
[error] (Compile / compileIncremental) Compilation failed
Maybe worth looking into scalaz-deriving that has support for it.
It seems the
@newtypeannotation from the scala-newtype library doesn't work well with the@deriveannotation.This fails to compile:
Here's the error:
Maybe worth looking into scalaz-deriving that has support for it.