From ed4a25ae35459dc060aa984fd1b9648c16803f79 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 9 Apr 2024 01:58:29 +0000 Subject: [PATCH 1/2] Update zio-schema, zio-schema-derivation, ... to 1.1.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 151b342..dc13424 100644 --- a/build.sbt +++ b/build.sbt @@ -8,7 +8,7 @@ val scala2 = "2.13.13" val scala3 = "3.3.3" val zioVersion = "2.0.21" -val zioSchemaVersion = "0.4.17" +val zioSchemaVersion = "1.1.0" name := "desert" From 86efb8d204abdea2ce467346958ca6bde7462772 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Sat, 20 Apr 2024 11:06:32 +0200 Subject: [PATCH 2/2] Fix --- .../vigoo/desert/zioschema/DerivedBinaryCodec.scala | 1 + .../github/vigoo/desert/zioschema/schemas/package.scala | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/desert-zio-schema/src/main/scala/io/github/vigoo/desert/zioschema/DerivedBinaryCodec.scala b/desert-zio-schema/src/main/scala/io/github/vigoo/desert/zioschema/DerivedBinaryCodec.scala index 1195a12..bb54b63 100644 --- a/desert-zio-schema/src/main/scala/io/github/vigoo/desert/zioschema/DerivedBinaryCodec.scala +++ b/desert-zio-schema/src/main/scala/io/github/vigoo/desert/zioschema/DerivedBinaryCodec.scala @@ -906,6 +906,7 @@ object DerivedBinaryCodec extends DerivedBinaryCodecVersionSpecific { case Schema.Either(left, right, annotations) => None case Schema.Lazy(schema0) => findTopLevelOptionalNode(schema0()) case Schema.Dynamic(annotations) => None + case Schema.Fallback(left, right, schema, annotations) => None } private def fieldToDeserializationCommand( diff --git a/desert-zio-schema/src/main/scala/io/github/vigoo/desert/zioschema/schemas/package.scala b/desert-zio-schema/src/main/scala/io/github/vigoo/desert/zioschema/schemas/package.scala index 272d440..43cc861 100644 --- a/desert-zio-schema/src/main/scala/io/github/vigoo/desert/zioschema/schemas/package.scala +++ b/desert-zio-schema/src/main/scala/io/github/vigoo/desert/zioschema/schemas/package.scala @@ -19,12 +19,12 @@ package object schemas { Schema.fail("__builtin_throwable_codec__") val builtInArrayCodecTypeId: TypeId = TypeId.parse("scala.Array") - implicit def builtInArrayCodec[A: ClassTag](implicit elemSchema: Schema[A]): Schema[Array[A]] = + implicit def builtInArrayCodec[A](implicit elemSchema: Schema[A]): Schema[Array[A]] = Schema.CaseClass1[A, Array[A]]( builtInArrayCodecTypeId, Schema.Field[Array[A], A]("element", elemSchema, get0 = _ => ???, set0 = (_, _) => ???), (_: A) => ???, - annotations0 = Chunk(implicitly[ClassTag[A]]) + annotations0 = Chunk.empty ) val builtInTryCodecTypeId: TypeId = TypeId.parse("scala.util.Try") @@ -62,7 +62,7 @@ package object schemas { ) val typeRegistryTypeId: TypeId = TypeId.parse("io.github.vigoo.desert.TypeRegistry") - def codecFromTypeRegistry[A: ClassTag]: Schema[A] = + def codecFromTypeRegistry[A]: Schema[A] = Schema.CaseClass1[Nothing, A]( typeRegistryTypeId, Schema.Field[A, Nothing]( @@ -72,6 +72,6 @@ package object schemas { set0 = (_, _) => ??? ), (_: A) => ???, - annotations0 = Chunk(implicitly[ClassTag[A]]) + annotations0 = Chunk.empty ) }