We tried to upgrade to 0.4.14 and noticed our tests failing in places where enums were supposed to be decoded. Happens specifically for enums which are "not simple" i.e. they have parameters.
Example:
enum Colour(val rgb: Int) {
case Red extends Colour(0xff0000)
case Green extends Colour(0x00ff00)
case Blue extends Colour(0x0000ff)
}
case class ColourContainer(colour: Colour)
object ColourContainer {
given Schema[ColourContainer] = DeriveSchema.gen[ColourContainer]
}
val codec = summon[BinaryCodec[ColourContainer]]
val cc = ColourContainer(Colour.Red)
val encoded = codec.encode(cc)
println(encoded.asString)
val decoded = codec.decode(encoded)
println(decoded)
We tried to upgrade to 0.4.14 and noticed our tests failing in places where enums were supposed to be decoded. Happens specifically for enums which are "not simple" i.e. they have parameters.
Example:
v0.4.13 output
v0.4.14 output