我正在尝试运行js_of_eliom,但它似乎没有ppx_dering这是我制作时得到的信息:
js_of_eliom -ppx -c -package lwt -package js_of_ocaml.deriving -package js_of_ocaml.ppx simple_pomodoro.eliom
Fatal error: exception Fl_package_base.No_such_package("js_of_ocaml.ppx", "")
make: *** [_client/simple_pomodoro.cmo] Error 2
当我进行ocamlfind查询js_of_ocaml.px时,我得到了这个:
ocamlfind: Package `js_of_ocaml.ppx' not found
但是我已经安装了ppx_dering,opam列表显示它:
ppx_deriving 3.3 Type-driven code generation for OCaml >=4.02
我和el capitan一起在mac osx里跑步(10.11)知道为什么会发生这种事吗?
编辑
哦,很抱歉我也安装了js_of_ocml,这是我的ocamlfind:中出现的内容
λ ~/ ocamlfind list | grep js_of_ocaml
js_of_ocaml (version: 2.7)
js_of_ocaml.compiler (version: [distributed with js_of_ocaml])
js_of_ocaml.compiler.with_findlib (version: n/a)
js_of_ocaml.deriving (version: [distributed with js_of_ocaml])
js_of_ocaml.deriving.ppx (version: [distributed with js_of_ocaml])
js_of_ocaml.deriving.syntax (version: [distributed with js_of_ocaml])
js_of_ocaml.graphics (version: [distributed with js_of_ocaml])
js_of_ocaml.log (version: [distributed with js_of_ocaml])
js_of_ocaml.ocamlbuild (version: [distributed with js_of_ocaml])
js_of_ocaml.syntax (version: [distributed with js_of_ocaml])
js_of_ocaml.toplevel (version: [distributed with js_of_ocaml])
js_of_ocaml.tyxml (version: [distributed with js_of_ocaml])
js_of_ocaml.weak (version: [distributed with js_of_ocaml])
ppx_deriving
是一个驱动程序,用于管理不同的Deriver。它本身并没有提供任何信息。您需要安装js_of_ocaml
deriver,它是js_of_ocaml
包的一部分:
opam install js_of_ocaml
结果你会得到它:
$ ocamlfind list | grep js_of_ocaml.ppx
js_of_ocaml.ppx (version: [distributed with js_of_ocaml])
js_of_ocaml.ppx.internal (version: [distributed with js_of_ocaml])
我通过github在ocsigen问题报告中找到了解决方案https://github.com/ocsigen/eliom/issues/251
我做到了:
- 我已经重新安装了opam(v.1.2.2),重新初始化,安装4.02.3,utop&eliom。它仍然不起作用。然后我安装了deriving_px.3.0.0,就像你在SO中提到的那样,现在它运行得很好。Thx