fd4s / vulcan

Functional Avro for Scala
https://fd4s.github.io/vulcan
Apache License 2.0
102 stars 33 forks source link

Allow extending `Codec` #504

Open cyber-barrista opened 1 year ago

cyber-barrista commented 1 year ago

I have a custom encoding/decoding logic but would still like to take advantage of other fd4s/vulcan goodies. Currently, it is not very possible (aside from maybe using deprecated Codec.instance) to make your own Codec since it is sealed. Are there any issues you can foresee with custom implementations?

bplommer commented 1 year ago

The reason we deprecated Codec.instance is so that Codec can be changed to an algebraic data type as set out in #437 . Can you say a bit about your use case for this?

lucaviolanti commented 1 year ago

We had a use case for other instances of Codec (for types supported by the Avro spec: instant micros and local datetime millis) and we just created a PR for them.