You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm upgrading some 2.13 code to 3.3.1. It makes use of value classes which Avro4s was previously able to derive a Decoder for, but in Scala 3 cannot.
In short, I think this should work with Avro4s 5.0.8, but does not (Scastie):
case class Thing(value: String) extends AnyVal
import com.sksamuel.avro4s.Decoder
println(implicitly[Decoder[Thing]])
gives
No given instance of type com.sksamuel.avro4s.Decoder[Playground.Thing] was found for parameter e of method implicitly in object Predef.
I found:
com.sksamuel.avro4s.Decoder.autoDerived[Playground.Thing](
/* missing */summon[deriving.Mirror.Of[Playground.Thing]])
But Failed to synthesize an instance of type deriving.Mirror.Of[Playground.Thing]:
* class Thing is not a generic product because it is a value class
* class Thing is not a generic sum because it is not a sealed class.
I'm upgrading some 2.13 code to 3.3.1. It makes use of value classes which Avro4s was previously able to derive a
Decoder
for, but in Scala 3 cannot.In short, I think this should work with Avro4s 5.0.8, but does not (Scastie):
gives
In Avro4s 4.1.1 it works fine.
Am I missing something here?
The text was updated successfully, but these errors were encountered: