From 27019f53ef06f49012474fb60c6db7afd463505f Mon Sep 17 00:00:00 2001 From: Leon Poon Date: Wed, 27 Sep 2023 22:01:23 +0800 Subject: [PATCH 1/4] add (broken, passing) test for UnionOfOneNonNullType --- .../src/test/avro/unions_with_coproduct2.avsc | 16 ++++++++++ .../UnionOfOneNonNullType.scala | 30 +++++++++++++++++ .../UnionOfOneNonNullType.scala | 30 +++++++++++++++++ .../UnionOfOneNonNullType.scala | 32 +++++++++++++++++++ .../specific/SpecificFileToFileSpec.scala | 12 ++++--- .../src/test/scala/util/Util.scala | 8 +++++ 6 files changed, 123 insertions(+), 5 deletions(-) create mode 100644 avrohugger-core/src/test/expected/specific/OptionEitherShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala create mode 100644 avrohugger-core/src/test/expected/specific/OptionShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala create mode 100644 avrohugger-core/src/test/expected/specific/OptionalShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala diff --git a/avrohugger-core/src/test/avro/unions_with_coproduct2.avsc b/avrohugger-core/src/test/avro/unions_with_coproduct2.avsc index 4a0e2f69..b3d52b4d 100644 --- a/avrohugger-core/src/test/avro/unions_with_coproduct2.avsc +++ b/avrohugger-core/src/test/avro/unions_with_coproduct2.avsc @@ -1,4 +1,20 @@ [ + { + "namespace": "com.example.avrohugger.unions_with_coproduct_avsc2", + "name": "UnionOfOneNonNullType", + "type": "record", + "fields": [ + { + "name": "f3", + "type": [ + { + "type": "map", + "values": "string" + } + ] + } + ] + }, { "namespace": "com.example.avrohugger.unions_with_coproduct_avsc2", "name": "UnionOfNullWithOneNonNullType", diff --git a/avrohugger-core/src/test/expected/specific/OptionEitherShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala b/avrohugger-core/src/test/expected/specific/OptionEitherShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala new file mode 100644 index 00000000..85d4ff68 --- /dev/null +++ b/avrohugger-core/src/test/expected/specific/OptionEitherShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala @@ -0,0 +1,30 @@ +/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */ +package com.example.avrohugger.unions_with_coproduct_avsc2 + +import scala.annotation.switch + +final case class UnionOfOneNonNullType(var f3: Map[String, String]) extends org.apache.avro.specific.SpecificRecordBase { + def this() = this(shapeless.Coproduct[Map[String, String] :+: CNil](Map("" -> ""))) + def get(field$: Int): AnyRef = { + (field$: @switch) match { + case 0 => { + f3 + }.asInstanceOf[AnyRef] + case _ => new org.apache.avro.AvroRuntimeException("Bad index") + } + } + def put(field$: Int, value: Any): Unit = { + (field$: @switch) match { + case 0 => this.f3 = { + value + }.asInstanceOf[Map[String, String]] + case _ => new org.apache.avro.AvroRuntimeException("Bad index") + } + () + } + def getSchema: org.apache.avro.Schema = com.example.avrohugger.unions_with_coproduct_avsc2.UnionOfOneNonNullType.SCHEMA$ +} + +object UnionOfOneNonNullType { + val SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"UnionOfOneNonNullType\",\"namespace\":\"com.example.avrohugger.unions_with_coproduct_avsc2\",\"fields\":[{\"name\":\"f3\",\"type\":[{\"type\":\"map\",\"values\":\"string\"}]}]}") +} \ No newline at end of file diff --git a/avrohugger-core/src/test/expected/specific/OptionShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala b/avrohugger-core/src/test/expected/specific/OptionShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala new file mode 100644 index 00000000..85d4ff68 --- /dev/null +++ b/avrohugger-core/src/test/expected/specific/OptionShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala @@ -0,0 +1,30 @@ +/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */ +package com.example.avrohugger.unions_with_coproduct_avsc2 + +import scala.annotation.switch + +final case class UnionOfOneNonNullType(var f3: Map[String, String]) extends org.apache.avro.specific.SpecificRecordBase { + def this() = this(shapeless.Coproduct[Map[String, String] :+: CNil](Map("" -> ""))) + def get(field$: Int): AnyRef = { + (field$: @switch) match { + case 0 => { + f3 + }.asInstanceOf[AnyRef] + case _ => new org.apache.avro.AvroRuntimeException("Bad index") + } + } + def put(field$: Int, value: Any): Unit = { + (field$: @switch) match { + case 0 => this.f3 = { + value + }.asInstanceOf[Map[String, String]] + case _ => new org.apache.avro.AvroRuntimeException("Bad index") + } + () + } + def getSchema: org.apache.avro.Schema = com.example.avrohugger.unions_with_coproduct_avsc2.UnionOfOneNonNullType.SCHEMA$ +} + +object UnionOfOneNonNullType { + val SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"UnionOfOneNonNullType\",\"namespace\":\"com.example.avrohugger.unions_with_coproduct_avsc2\",\"fields\":[{\"name\":\"f3\",\"type\":[{\"type\":\"map\",\"values\":\"string\"}]}]}") +} \ No newline at end of file diff --git a/avrohugger-core/src/test/expected/specific/OptionalShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala b/avrohugger-core/src/test/expected/specific/OptionalShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala new file mode 100644 index 00000000..eed1e7aa --- /dev/null +++ b/avrohugger-core/src/test/expected/specific/OptionalShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala @@ -0,0 +1,32 @@ +/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */ +package com.example.avrohugger.unions_with_coproduct_avsc2 + +import scala.annotation.switch + +import shapeless.{:+:, CNil, Coproduct} + +final case class UnionOfOneNonNullType(var f3: Map[String, String] :+: CNil) extends org.apache.avro.specific.SpecificRecordBase { + def this() = this(shapeless.Coproduct[Map[String, String] :+: CNil](Map("" -> ""))) + def get(field$: Int): AnyRef = { + (field$: @switch) match { + case 0 => { + f3 + }.asInstanceOf[AnyRef] + case _ => new org.apache.avro.AvroRuntimeException("Bad index") + } + } + def put(field$: Int, value: Any): Unit = { + (field$: @switch) match { + case 0 => this.f3 = { + value + }.asInstanceOf[Map[String, String] :+: CNil] + case _ => new org.apache.avro.AvroRuntimeException("Bad index") + } + () + } + def getSchema: org.apache.avro.Schema = com.example.avrohugger.unions_with_coproduct_avsc2.UnionOfOneNonNullType.SCHEMA$ +} + +object UnionOfOneNonNullType { + val SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"UnionOfOneNonNullType\",\"namespace\":\"com.example.avrohugger.unions_with_coproduct_avsc2\",\"fields\":[{\"name\":\"f3\",\"type\":[{\"type\":\"map\",\"values\":\"string\"}]}]}") +} \ No newline at end of file diff --git a/avrohugger-core/src/test/scala/specific/SpecificFileToFileSpec.scala b/avrohugger-core/src/test/scala/specific/SpecificFileToFileSpec.scala index 0620a777..a170daeb 100644 --- a/avrohugger-core/src/test/scala/specific/SpecificFileToFileSpec.scala +++ b/avrohugger-core/src/test/scala/specific/SpecificFileToFileSpec.scala @@ -7,6 +7,7 @@ import avrohugger.format.SpecificRecord import avrohugger.types._ import org.specs2._ import org.specs2.execute.Result +import util.Util.containExpectedContentIn import java.io.File import scala.util.Try @@ -305,17 +306,18 @@ class SpecificFileToFileSpec extends Specification { val outDir = gen.defaultOutputDir + s"/specific/$unionType" gen.fileToFile(inOrderSchema, outDir) - val classes = List( + Result.forall(List( + "UnionOfOneNonNullType", "UnionOfNullWithOneNonNullType", "UnionOfTwoNonNullTypes", "UnionOfNullWithTwoNonNullTypes", "UnionOfMoreThanTwoNonNullTypes", "UnionOfNullWithMoreThanTwoNonNullTypes" - ) - val sources = classes.map(className => util.Util.readFile(s"avrohugger-core/src/test/expected/specific/$unionType/com/example/avrohugger/unions_with_coproduct_avsc2/$className.scala")) + )) { className => - Result.forall(classes.zip(sources)) { case (className, expect) => - util.Util.readFile(s"target/generated-sources/specific/$unionType/com/example/avrohugger/unions_with_coproduct_avsc2/$className.scala") === expect + val generatedFile = s"target/generated-sources/specific/$unionType/com/example/avrohugger/unions_with_coproduct_avsc2/$className.scala" + val expectationFile = s"avrohugger-core/src/test/expected/specific/$unionType/com/example/avrohugger/unions_with_coproduct_avsc2/$className.scala" + generatedFile must containExpectedContentIn(expectationFile) } } diff --git a/avrohugger-core/src/test/scala/util/Util.scala b/avrohugger-core/src/test/scala/util/Util.scala index 77c26b3a..8663458d 100644 --- a/avrohugger-core/src/test/scala/util/Util.scala +++ b/avrohugger-core/src/test/scala/util/Util.scala @@ -1,5 +1,7 @@ package util +import org.specs2.matcher.{Expectable, MatchResult, Matcher} + object Util { def readFile(fileName: String, maxTries: Int = 3): String = { @@ -26,4 +28,10 @@ object Util { case e: Throwable => false } + def containExpectedContentIn(expectPath: String): Matcher[String] = new Matcher[String] { + override def apply[S <: String](t: Expectable[S]): MatchResult[S] = { + val generatedPath = t.value + result(readFile(generatedPath) == readFile(expectPath), s"$generatedPath === $expectPath", s"\ndiff -ruBbE $expectPath $generatedPath", t) + } + } } \ No newline at end of file From 9886026e16a8b7697e92a8f8f9770b78a5f1243a Mon Sep 17 00:00:00 2001 From: Leon Poon Date: Sun, 1 Oct 2023 13:46:30 +0800 Subject: [PATCH 2/4] fix bug where default value for Map(as single type of a union) is incorrectly Coproduct --- .../src/main/scala/matchers/DefaultParamMatcher.scala | 2 ++ .../src/main/scala/types/ComplexAvroScalaTypes.scala | 6 +++++- .../unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala | 2 +- .../unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/avrohugger-core/src/main/scala/matchers/DefaultParamMatcher.scala b/avrohugger-core/src/main/scala/matchers/DefaultParamMatcher.scala index 3196be5b..9b6ef4ff 100644 --- a/avrohugger-core/src/main/scala/matchers/DefaultParamMatcher.scala +++ b/avrohugger-core/src/main/scala/matchers/DefaultParamMatcher.scala @@ -68,6 +68,8 @@ object DefaultParamMatcher { case Schema.Type.UNION => val schemas = avroSchema.getTypes.asScala.toList if (avroSchema.isNullable) NONE + else if (schemas.size == 1 && !typeMatcher.avroScalaTypes.union.useCoproductForLoneNonNullType) + asDefaultParam(classStore, schemas.head, typeMatcher) else if (schemas.size == 2 && typeMatcher.avroScalaTypes.union.useEitherForTwoNonNullTypes) LEFT(asDefaultParam(classStore, schemas.head, typeMatcher)) else COPRODUCT(asDefaultParam(classStore, schemas.head, typeMatcher), schemas.map(typeMatcher.toScalaType(classStore, None, _).safeToString)) diff --git a/avrohugger-core/src/main/scala/types/ComplexAvroScalaTypes.scala b/avrohugger-core/src/main/scala/types/ComplexAvroScalaTypes.scala index 012ad302..8bf7d0e7 100644 --- a/avrohugger-core/src/main/scala/types/ComplexAvroScalaTypes.scala +++ b/avrohugger-core/src/main/scala/types/ComplexAvroScalaTypes.scala @@ -19,9 +19,13 @@ case object EnumAsScalaString extends AvroScalaEnumType sealed trait AvroScalaUnionType extends Product with Serializable { val useEitherForTwoNonNullTypes: Boolean = false + val useCoproductForLoneNonNullType: Boolean = false + } -case object OptionalShapelessCoproduct extends AvroScalaUnionType +case object OptionalShapelessCoproduct extends AvroScalaUnionType { + override val useCoproductForLoneNonNullType: Boolean = true +} case object OptionShapelessCoproduct extends AvroScalaUnionType case object OptionEitherShapelessCoproduct extends AvroScalaUnionType { override val useEitherForTwoNonNullTypes: Boolean = true diff --git a/avrohugger-core/src/test/expected/specific/OptionEitherShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala b/avrohugger-core/src/test/expected/specific/OptionEitherShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala index 85d4ff68..b2b487fc 100644 --- a/avrohugger-core/src/test/expected/specific/OptionEitherShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala +++ b/avrohugger-core/src/test/expected/specific/OptionEitherShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala @@ -4,7 +4,7 @@ package com.example.avrohugger.unions_with_coproduct_avsc2 import scala.annotation.switch final case class UnionOfOneNonNullType(var f3: Map[String, String]) extends org.apache.avro.specific.SpecificRecordBase { - def this() = this(shapeless.Coproduct[Map[String, String] :+: CNil](Map("" -> ""))) + def this() = this(Map("" -> "")) def get(field$: Int): AnyRef = { (field$: @switch) match { case 0 => { diff --git a/avrohugger-core/src/test/expected/specific/OptionShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala b/avrohugger-core/src/test/expected/specific/OptionShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala index 85d4ff68..b2b487fc 100644 --- a/avrohugger-core/src/test/expected/specific/OptionShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala +++ b/avrohugger-core/src/test/expected/specific/OptionShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala @@ -4,7 +4,7 @@ package com.example.avrohugger.unions_with_coproduct_avsc2 import scala.annotation.switch final case class UnionOfOneNonNullType(var f3: Map[String, String]) extends org.apache.avro.specific.SpecificRecordBase { - def this() = this(shapeless.Coproduct[Map[String, String] :+: CNil](Map("" -> ""))) + def this() = this(Map("" -> "")) def get(field$: Int): AnyRef = { (field$: @switch) match { case 0 => { From 98d78cf691b0605598b8b1b598e62194ec63e9a0 Mon Sep 17 00:00:00 2001 From: Leon Poon Date: Sun, 1 Oct 2023 13:51:58 +0800 Subject: [PATCH 3/4] use empty map for default of map field, not map with 1 element of blank-string key --- .../src/main/scala/matchers/DefaultParamMatcher.scala | 2 +- .../unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala | 2 +- .../unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala | 2 +- .../unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/avrohugger-core/src/main/scala/matchers/DefaultParamMatcher.scala b/avrohugger-core/src/main/scala/matchers/DefaultParamMatcher.scala index 9b6ef4ff..4b77be83 100644 --- a/avrohugger-core/src/main/scala/matchers/DefaultParamMatcher.scala +++ b/avrohugger-core/src/main/scala/matchers/DefaultParamMatcher.scala @@ -76,7 +76,7 @@ object DefaultParamMatcher { case Schema.Type.ARRAY => CustomDefaultParamMatcher.checkCustomArrayType(typeMatcher.avroScalaTypes.array) DOT "empty" case Schema.Type.MAP => - MAKE_MAP(LIT("") ANY_-> asDefaultParam(classStore, avroSchema.getValueType, typeMatcher)) + ID("Map") DOT "empty" } } diff --git a/avrohugger-core/src/test/expected/specific/OptionEitherShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala b/avrohugger-core/src/test/expected/specific/OptionEitherShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala index b2b487fc..f234ea9a 100644 --- a/avrohugger-core/src/test/expected/specific/OptionEitherShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala +++ b/avrohugger-core/src/test/expected/specific/OptionEitherShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala @@ -4,7 +4,7 @@ package com.example.avrohugger.unions_with_coproduct_avsc2 import scala.annotation.switch final case class UnionOfOneNonNullType(var f3: Map[String, String]) extends org.apache.avro.specific.SpecificRecordBase { - def this() = this(Map("" -> "")) + def this() = this(Map.empty) def get(field$: Int): AnyRef = { (field$: @switch) match { case 0 => { diff --git a/avrohugger-core/src/test/expected/specific/OptionShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala b/avrohugger-core/src/test/expected/specific/OptionShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala index b2b487fc..f234ea9a 100644 --- a/avrohugger-core/src/test/expected/specific/OptionShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala +++ b/avrohugger-core/src/test/expected/specific/OptionShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala @@ -4,7 +4,7 @@ package com.example.avrohugger.unions_with_coproduct_avsc2 import scala.annotation.switch final case class UnionOfOneNonNullType(var f3: Map[String, String]) extends org.apache.avro.specific.SpecificRecordBase { - def this() = this(Map("" -> "")) + def this() = this(Map.empty) def get(field$: Int): AnyRef = { (field$: @switch) match { case 0 => { diff --git a/avrohugger-core/src/test/expected/specific/OptionalShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala b/avrohugger-core/src/test/expected/specific/OptionalShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala index eed1e7aa..45183cdd 100644 --- a/avrohugger-core/src/test/expected/specific/OptionalShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala +++ b/avrohugger-core/src/test/expected/specific/OptionalShapelessCoproduct/com/example/avrohugger/unions_with_coproduct_avsc2/UnionOfOneNonNullType.scala @@ -6,7 +6,7 @@ import scala.annotation.switch import shapeless.{:+:, CNil, Coproduct} final case class UnionOfOneNonNullType(var f3: Map[String, String] :+: CNil) extends org.apache.avro.specific.SpecificRecordBase { - def this() = this(shapeless.Coproduct[Map[String, String] :+: CNil](Map("" -> ""))) + def this() = this(shapeless.Coproduct[Map[String, String] :+: CNil](Map.empty)) def get(field$: Int): AnyRef = { (field$: @switch) match { case 0 => { From 94551e68d3de5940829622bbbc69eb93d860337c Mon Sep 17 00:00:00 2001 From: Julian Peeters Date: Sun, 1 Oct 2023 12:36:29 -0700 Subject: [PATCH 4/4] Bump version, update readme --- README.md | 12 ++++++------ build.sbt | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f39ed250..90ee1e7e 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ _Note:_ Currently [Treehugger](http://eed3si9n.com/treehugger/comments.html#Scal ##### Get the dependency with: - "com.julianpeeters" %% "avrohugger-core" % "1.5.5" + "com.julianpeeters" %% "avrohugger-core" % "1.5.6" ##### Description: @@ -209,7 +209,7 @@ namespace rewritten. Multiple conflicting wildcards are not permitted. ##### Get the dependency with: - "com.julianpeeters" %% "avrohugger-filesorter" % "1.5.5" + "com.julianpeeters" %% "avrohugger-filesorter" % "1.5.6" ##### Description: @@ -229,22 +229,22 @@ To ensure dependent schemas are compiled in the proper order (thus avoiding `org #### `avrohugger-tools` - Download the avrohugger-tools jar for Scala [2.12](https://search.maven.org/remotecontent?filepath=com/julianpeeters/avrohugger-tools_2.12/1.5.5/avrohugger-tools_2.12-1.5.5-assembly.jar), or Scala [2.13](https://search.maven.org/remotecontent?filepath=com/julianpeeters/avrohugger-tools_2.13/1.5.5/avrohugger-tools_2.13-1.5.5-assembly.jar) (>30MB!) and use it like the avro-tools jar `Usage: [-string] (schema|protocol|datafile) input... outputdir`: + Download the avrohugger-tools jar for Scala [2.12](https://search.maven.org/remotecontent?filepath=com/julianpeeters/avrohugger-tools_2.12/1.5.6/avrohugger-tools_2.12-1.5.6-assembly.jar), or Scala [2.13](https://search.maven.org/remotecontent?filepath=com/julianpeeters/avrohugger-tools_2.13/1.5.6/avrohugger-tools_2.13-1.5.6-assembly.jar) (>30MB!) and use it like the avro-tools jar `Usage: [-string] (schema|protocol|datafile) input... outputdir`: * `generate` generates Scala case class definitions: -`java -jar /path/to/avrohugger-tools_2.12-1.5.5-assembly.jar generate schema user.avsc . ` +`java -jar /path/to/avrohugger-tools_2.12-1.5.6-assembly.jar generate schema user.avsc . ` * `generate-specific` generates definitions that extend Avro's `SpecificRecordBase`: -`java -jar /path/to/avrohugger-tools_2.12-1.5.5-assembly.jar generate-specific schema user.avsc . ` +`java -jar /path/to/avrohugger-tools_2.12-1.5.6-assembly.jar generate-specific schema user.avsc . ` * `generate-scavro` (`@deprecated` since avrohugger v1.5.0) generates definitions that extend Scavro's `AvroSerializable`: -`java -jar /path/to/avrohugger-tools_2.12-1.5.5-assembly.jar generate-scavro schema user.avsc . ` +`java -jar /path/to/avrohugger-tools_2.12-1.5.6-assembly.jar generate-scavro schema user.avsc . ` ## Warnings diff --git a/build.sbt b/build.sbt index d008e14a..aeba23e7 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val avroVersion = "1.11.3" lazy val commonSettings = Seq( organization := "com.julianpeeters", - version := "1.5.5", + version := "1.5.6", ThisBuild / versionScheme := Some("semver-spec"), scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature"), Test / scalacOptions ++= Seq("-Yrangepos"),