Creating a ppx that transforms record updates

metapp registers itself as a ppxlib preprocess phase: it should cooperate nicely with ppxlib transformations that only register rules, such as opam - ppx_import and “native” ppxlib derivers such as opam - ppx_compare, opam - ppx_show, opam - refl. But metapp cannot cooperate with opam - ppx_deriving because ppx_deriving registers itself as a preprocess phase as well, mainly to maintain backward compatibility because the syntax of ppxlib rules do not follow the syntax chosen by ppx_deriving (if I understand correctly, ppx_deriving maintains legacy derivers: I believe new developments should use native ppxlib derivers, that are compatible with metapp). metapp cannot cooperate with opam - ppx_optcomp neither. However, I believe it should be possible to register metapp as ppxlib rules (and not preprocess phase) to overcome these incompatibilities in a future version if needed.

1 Like