We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After upgrading from 1.5.0 to 1.7.0 I noticed that code below doesnt compile anymore (its a minimized version)
syntax = "proto3"; package swissborg.protobuf.ledger.journal; option java_package = "com.swissborg.protobuf.ledger.journal"; message Foo { oneof sealed_value { Foo1 foo1 = 1; } } message Foo1 {}
import com.swissborg.protobuf.ledger.{journal => proto} import io.scalaland.chimney import io.scalaland.chimney.protobufs._ sealed trait Foo object Foo { final case class Bar1() extends Foo implicit lazy val sagaCodec: chimney.Codec[Foo, proto.Foo] = chimney.Codec.define[Foo, proto.Foo] .withSealedSubtypeRenamed[Bar1, proto.Foo1] .buildCodec }
It can be further minimized into
sealed trait Proto extends Product with Serializable object Proto { case class Foo(a: Int) extends Proto case object Empty extends Proto } sealed trait Domain extends Product with Serializable object Domain { case class Foo1(a: Int) extends Domain } implicit def handleEmpty[To]: PartialTransformer[Proto.Empty.type, To] = (_: Proto.Empty.type, _: Boolean) => partial.Result.fromEmpty[To] (Proto.Foo(10): Proto) .intoPartial[Domain] .withSealedSubtypeRenamed[Proto.Foo, Domain.Foo1] .transform .asOption ==> Some(Domain.Foo1(10)) (Proto.Empty: Proto) .intoPartial[Domain] .withSealedSubtypeRenamed[Proto.Foo, Domain.Foo1] .transform .asOption ==> None
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
After upgrading from 1.5.0 to 1.7.0 I noticed that code below doesnt compile anymore (its a minimized version)
It can be further minimized into
The text was updated successfully, but these errors were encountered: