PPX name conflict, what to do with dependencies

This is a useful error message which makes it immensely easier to help you.

What happens is that 2 rewriters (ppx_log and the one defined at ppx/src/Logging_ppx.re) specify how [%log.error ...] should be rewritten. This happens because they are registered in a same driver, because in lib-core/kernel/future/dune you’re asking for both of these rewriters.
2 solutions:

  • you use a different extension name, so that the rewriters can be registered into a single driver
  • you change the (preprocessing) part so that it contains only the bits you use: ppx_jane is a collection of ppx rewriters that includes ppx_expect, ppx_sexp_conv, and ppx_log, but if you don’t use all of that, you can only specify the bits you use. for example, (pps ppx_expect lwt_ppx bisect_ppx --conditional our-core.ppx).
1 Like