wvlet / airframe

Essential Building Blocks for Scala
https://wvlet.org/airframe
Apache License 2.0
633 stars 66 forks source link

airframe-codec: Find a default codec from Object #2019

Open xerial opened 2 years ago

xerial commented 2 years ago

Support defining the default codec of an object:

object A {
  def defaultCodec: MessageCodec[A] = ... 
}

airframe-surface needs to find this method when Surface.of[A] is called. This requires a dependency change; airframe-msgpack needs to be referenced in airframe-surface. Is it possible or do we need to introduce another common interface for object serde?

xerial commented 2 years ago

Related to #511