Closed smondet closed 4 years ago
Manually installing ppx_deriving
then works.
yh that's expected. Basically ppx_sexp_conv doesn't need ppx_deriving but exposes a compatibility mode that uses ppx_deriving. The toplevel relies on this compatibility mode.
It's expected that people will encounter a missing lib when using ppx_sexp_conv
in an obvious way? Well, OK, often one will have already installed ppx_deriving
for other reasons, so maybe this won't happen very often, but perhaps at least a note about this could be added to the README.
(I worry that little things like this, encountered repeatedly in different contexts--as one does--is the sort of thing that will turn people off of OCaml before they are far enough into it to appreciate it.)
Is there a way to intercept this missing library error and print a user friendly message? Perhaps using some compilation flags at build time?
I don't understand everything that's going on, but this sounds like a widespread issue that affects many ppxes.
For example here a user is reasonably(ish) describing a related issue as a bug, but it's in ppx_deriving_json
.
Not sure what the right solution is, maybe it's just phasing out findlib.
Actually, closing it as a duplicate of #30.
In Utop, for OCaml 4.06.1: