I recently git cloned two eliom projects and one ocaml project onto a second machine running a different distro of linux and a more recent version of opam but nothing works. All projects compile without complaint on both platforms. The ocaml project I opam pin and use in one of the two eliom projects. The other eliom project does not depend on any opam pinned project and includes the ml and mli files from my opam pinned project to provide the functionality I want. I did this to try to eliminate any possible errors on my part exporting js for use in the eliom project but it appears to be irrelevant.
Unfortunately on the second platform everything fails at runtime.
Details of Distro A: opam 1.2 eliom 6.3 js_of_ocaml 3.1.0 – Eliom projects works with references to an opam pinned project or instead with that project’s modules (ml & mli files) included in the eliom project.
Details of Distro B: opam 2 eliom 6.3 js_of_ocaml 3.2.0 – Identical eliom project (with references to the git cloned opam pinned project) fails at run time. Also fails with that project’s modules (ml & mli files) included in the eliom project. Also fails after downgrading to js_of_ocaml 3.1.0.
Failure in Firefox (using js_of_ocaml 3.2.0: “TypeError: b.charCodeAt is not a function”
Failure in firefox (using js_of_ocaml 3.1.0 and while including modules directly instead of referencing the opam pinned project: “TypeError: bT(…).replace is not a function”
I do not suspect my use of ocamlbuild in the case of the opam pinned project, and it’s not even a factor in one of my two eliom projects. Nor do I suspect the browser although I forgot which versions are being used on each platform but I can check soon enough. Nor do I suspect opam, but I guess I could downgrade to 1.2 and try again. Otherwise everything is identical and baffles me. There is no use of ssl/tls and I access the pages on local host on the same machine each time.
I’m wondering how to proceed to identify the cause of this error. Any suggestions?
=====UPDATE:=====
It turns out that downgrading from js_of_ocaml from 3.2.0 to 3.1.0 via opam does not in fact downgrade all relevant packages. I still had a few js_of_ocaml related packages at 3.2.0 such as js_of_ocaml-ppx, js_of_ocaml-ppx_deriving_json, js_of_ocaml-tyxml and js_of_ocaml-compiler. After I downgraded all of these to 3.1.0 I could recompile all projects and everything is working again. So there is a bug in js_of_ocaml 3.2.0 that prevents me from using it but unfortunately I couldn’t tell you where exactly.
1 Like