ocaml-community / obus

Pure OCaml implementation of the D-Bus protocol
Other
33 stars 15 forks source link

Port ppx from omp to ppxlib #25

Closed NathanReb closed 4 years ago

NathanReb commented 4 years ago

This PR ports obus.ppx from OMP to ppxlib. As discussed here, the next major release of OMP will drop significant parts of its API including the driver and Ast_mapper.

I did the naive port using Ast_traverse to keep this simple but I have the feeling this could be turned into a deriving ppx. Maybe with a few changes to ppxlib we wouldn't even have to break the ppx's API and could keep the [@@obus ...] syntax. Rewriting as such would improve performances when obus.ppx is combined with other PPXes.

You'll note that I bumped the minimum requirement for dune. That is due to the fact the 2.0 menhir extension is only available from dune 1.4 forward.

meadofpoetry commented 4 years ago

Thanks.

I did the naive port using Ast_traverse to keep this simple but I have the feeling this could be turned into a deriving ppx.

Well, I'm planning to remove ppx in 2.0 (it seems like nobody uses it, at least no one has said they do), so one could write a totally new ppx for obus as a standalone library, e.g. as a ppx_deriving plugin.