Eliom fails to install on every switch I have attempted > 4.06. I haven’t tried anything older. Can anyone share a switch and list of installed opam packages with version numbers that works? In other words, the output of “opam list”?
I could catalog, and perhaps I should, all the errors I get for every single major release version of ocaml. The net effect right now is that I cannot install Eliom at all.
I have tried 4.06.1, 4.07.0 4.08.0, 4.09.0, and 4.10.0 using opam version 2.1.0~beta built from source code from several months ago. After each switch is created I try “opam install eliom” and usually it craps out either at ocsigenserver or eliom, and once it crapped out at ocamlnet.
Errors are usually “Uninterpreted extension ‘lwt’” in building eliom. Sometimes I get errors about missing functions in lwt if I start downgrading lwt or Eliom depending on which I downgrade first and how much. In 4.06.1 for example, opam cannot install Ocsigenserver.2.16, I have to use 2.14 or 2.15, and even then I must use Lwt > 3.0.0 contrary to the version constraints, which states >= Lwt 3.0.0. I know that Lwt 4.0.0 permits compilation of Ocsigenserver.2.14 or 2.15 but I couldn’t tell you about any versions of Lwt between 3.0.0 and 4.0.0.
I did this to myself. I had a working install of eliom. But I didn’t output the list of “opam list” and now I don’t know what combination of packages I had that worked after invoking opam upgrade. When working with Eliom: don’t ever opam upgrade or at least not without capturing your list of installed packages so you can downgrade some in the hope of finding which one broke your installation.
Perhaps we could get an opam feature that reports back all the invocations of “opam install” that succeed (or fail for purely ocaml-package dependencies) along with the combination of packages and the switch? And the version of opam? We users are out in the wilderness trying to install packages all the time. Might as well get the feedback if you cannot test-build every single combination of all packages. But across all users, we are attempting an awful lot of combinations. And we cannot always upgrade to the latest switch of ocaml because it creates too much code-maintenance work unless we plan it out over time.
UPDATE: I just built eliom 6.12.0 under switch 4.09 but only after invoking it twice. I have no idea why that worked. I was just getting desperate so I hit it again. It failed the first time with zero output, not even an on-screen error message and nothing in the output file.
opam lock does this, see opam - opam 2.1.0 alpha is here! . It’s only documented in the release blog posts though, and it’s not the default workflow.
Esy, an alternative package manager (backward-compatible with Opam), does lockfiles and reproducible builds as part of its default workflow. I’ve been happily using it for several months now.
Didn’t know…thank you. Will investigate.
UPDATE: turns out under 4.06.1 at least, Eliom.6.7 will not compile with lwt_ppx 2.0.0 but will compile with lwt_ppx.1.2.3. I don’t know why. In case anyone wants to know. My only other path forward was to obtain the source code for eliom6.7. and start hacking at it and create an opam pin…but that’s just not right. Although in the process of doing that I saw many more warnings and such than I would have expected.
There is a build matrix at http://check.ocamllabs.io
Eliom seems to be installable on a few compiler versions. You could look at log and discover which versions of dependencies they are using
I recommend to use the very last versions of the packages.
It should work without problem with a fresh opam install and OCaml >= 4.08
opam install ocsigen-start.
You will probably have to install external depencies (use opam-depext for this).
If not, please report the problem (here or on Github).
I keep a separate switch for eliom, because its dependencies don’t necessarily match those of other packages for other purposes. All I did was make a new compiler switch for ocaml-4.08.1 with the eliom switch name, and then run ‘opam install eliom’ for that switch. That just seemed to work as-is, and after a considerable amount of downloading and compiling eliom was there. You can generate a test project with eliom-distillery to check it out.
I update the switch from time to time. I did recently get some breakage on an update by virtue of dependencies on the js_of_ocaml-ppx.deriving package becoming dependencies on the js_of_ocaml-ppx_deriving_json package. This required me to modify eliom projects’ Makefile.options file. Relatedly, the previous json ppx syntax of
Deriving_Json.t objects became [
], which broke some stuff. I think that is the first time I have encountered deliberate breakage of that kind.
The current version of eliom I have installed against ocaml-4.08.1 is eliom-6.12.0, which I think is the latest.
What about Eliom distillery created projects? Is Eliom now deprecated in favor of ocsigen-start? Would you suggest I port old Eliom projects to ocsigen-start?
Unfortunately using the latest versions is not always an option if it means being forced to upgrade the compiler and creating a lot of maintenance issues throughout an existing code base.
Ocsigen Start does not replace Eliom. It’s a template for an Eliom app, which is ready to use (I suggested to install ocsigen-start because it depends on everything else, but opam install eliom should be enough for you).
Of course it is not always possible to use the very last version of everything but i recommend to try, as much as possible. All dependencies are evolving constantly, and may become incompatible with on old version. This is very difficult to detect (and we won’t maintain old version of packages anyway).
There might have been an opam issue in all this. I compiled opam 2.0.7, completely removed the old opam and opam root. And now I can switch create 4.08 and install eliom.