julianpeeters / sbt-avrohugger

sbt plugin for generating Scala sources for Apache Avro schemas and protocols.
Apache License 2.0
133 stars 50 forks source link

Missing shapeless import #59

Closed Pierre1405 closed 6 years ago

Pierre1405 commented 6 years ago

Hello, I had an issue today with the generation of a case class with a missing shapeless import. You can find below the avro files and the generated class array error.tar.gz

This occurs while using an array type with more than 3 custom type {"namespace": "com.sigfox.das.avro", "type": "record", "name": "RawMessageWithError", "fields": [ {"name": "message", "type": "string"}, {"name": "meta", "type": {"type": "array", "items": ["com.sigfox.das.avro.NumberMetaData", "com.sigfox.das.avro.OtherMetaData", "com.sigfox.das.avro.StringMetaData"]}} ] }

I did my test with the avroScalaGenerate task. I tried with the 1.1.0 and the 2.0.0-RC10 versions

Thanks Pierre

julianpeeters commented 6 years ago

Thanks very much for the report @Pierre1405 , I'll see what I can do in the next couple weeks

Pierre1405 commented 6 years ago

Thx Julian that would be great!

julianpeeters commented 6 years ago

Thanks for hanging in there @Pierre1405, this should be fixed in avrhohugger version 1.0.0-RC12 and sbt-avrohugger version 2.0.0-RC12, at Sonatype now, and syncing with maven central shortly.