julianpeeters / avrohugger

Generate Scala case class definitions from Avro schemas
Apache License 2.0
201 stars 120 forks source link

bug of not importing CoProduct #177

Closed LeonPoon closed 11 months ago

LeonPoon commented 11 months ago

This PR doesn't actually fix anything but only shows a bug. Added a tested case which is passing but should fail.(avrohugger-core/src/test/expected/specific/com/example/avrohugger/unions_with_coproduct_avsc/s.scala should include import of CoProduct but it doesn't, hence the test currently passes.)

I don't have the next 24h to try and fix this, but if anyone else has the fix, feel free to commit on top.

julianpeeters commented 11 months ago

Good stuff, thank you for the contribution. Avrohugger's import system needs some love, but in the meantime we're now generating a fully qualified shapeless.Coproduct. Available now in avrohugger 1.5.3 and sbt-avrohugger 2.5.3, should be syncing up with maven central shortly