eliom 5.0.0 : fail to get it working

257 views Asked by At

I have updated eliom to the latest version (5.0.0) installed via opam, and it fails. I have tried both with 4.02.1 & 4.02.3 compiler, but, it fails to compile basic eliom :

eliomdep -client -ppx -package lwt.ppx -package js_of_ocaml.deriving.ppx -package js_of_ocaml.ppx mysite.eliom > _deps/mysite.eliom.client
Fatal error: exception Fl_package_base.No_such_package("js_of_ocaml.deriving.ppx", "")
make: *** [_deps/mysite.eliom.client] Erreur 2

Any idea ?

2

There are 2 answers

0
Pierre G. On

It looks like there is a flaw in Makefile.options generated by eliom-distillery : the CLIENT_PACKAGES is initially equal to a list of <package>.ppx ; one has to remove .ppx extension to get it works:

initial Makefile.options

...
# OCamlfind packages for the server
SERVER_PACKAGES := lwt.ppx js_of_ocaml.deriving.ppx
# OCamlfind packages for the client
CLIENT_PACKAGES := lwt.ppx js_of_ocaml.deriving.ppx js_of_ocaml.ppx
...

corrected Makefile.options :

...
# OCamlfind packages for the server
SERVER_PACKAGES := lwt js_of_ocaml.deriving
# OCamlfind packages for the client
CLIENT_PACKAGES := lwt js_of_ocaml.deriving js_of_ocaml
...

This is due to ppx-deriving.3.0 that is not installed. (Thx to Drup)

4
Drup On

You seems to be missing the ppx deriving plugin. It's an optional dependency.

opam install ppx_deriving

Are you using the base template ? I don't remember any use of ppx deriving in it.