Skip to content

Commit

Permalink
Merge pull request #464 from scala-steward/update/zio-schema-1.1.0
Browse files Browse the repository at this point in the history
Update zio-schema, zio-schema-derivation, ... to 1.1.0
  • Loading branch information
vigoo authored Apr 20, 2024
2 parents d215603 + 86efb8d commit 0323f26
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ val scala2 = "2.13.13"
val scala3 = "3.3.3"

val zioVersion = "2.0.22"
val zioSchemaVersion = "0.4.17"
val zioSchemaVersion = "1.1.0"

name := "desert"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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](
Expand All @@ -72,6 +72,6 @@ package object schemas {
set0 = (_, _) => ???
),
(_: A) => ???,
annotations0 = Chunk(implicitly[ClassTag[A]])
annotations0 = Chunk.empty
)
}

0 comments on commit 0323f26

Please sign in to comment.