ocaml-ppx / ppx_deriving_yojson

A Yojson codec generator for OCaml.
MIT License
155 stars 46 forks source link

Port to ppxlib registration and attributes #149

Closed sim642 closed 4 months ago

sim642 commented 2 years ago

Analogous to https://github.com/ocaml-ppx/ppx_deriving/pull/263. This doesn't necessarily depend on that PR, but some of the same criticism applies.

In particular the point about [%derive.to_yojson: ...] and [%derive.of_yojson: ...] being unsupported through ppxlib directly. According to sherlocode, only ocurrent uses one of these. Nevermind, the support can be preserved using a custom extension.

sim642 commented 5 months ago

@NathanReb Since this is along the lines of https://github.com/ocaml-ppx/ppx_deriving/pull/263 and that a release of ppx_deriving_yojson might be due (https://github.com/ocaml/opam-repository/pull/25675#issuecomment-2057097995), then this would also make sense to synchronize similar changes.

NathanReb commented 5 months ago

Yeah, I was looking into this just yesterday and was pleasantly suprised to see you had already worked on a ppxlib port.

I will review this ASAP!