1

When installing OCaml packages via esy (instead of opam), which package.json entry is needed to install a specific OCaml variant, such as "4.08.0+fp+flambda" instead of "4.08.0"?

I tried several variants of the following, which does not work:

{
  "dependencies": {
    "ocaml": "4.08.0+fp+flambda",
    ...
  }
}

Error message:

No package matching:

  ocaml@=4.8.0+fp

  Versions available:

    ocaml@4.8.1000
    ocaml@4.8.0
    ocaml@4.7.1004
    ...
vog
  • 23,517
  • 11
  • 59
  • 75

1 Answers1

2

All esy variant are stored here https://github.com/esy-ocaml/ocaml/tree/4.7.1000+esy+flambda in fact each ocaml version is on a branch. You see special commit to see how flambda option is added and do the same with your custom variant. You should fork it and point resolution of the form "ocaml": "github:user/esy-ocaml-fork#specificcommit" or "ocaml": "github:user/esy-ocaml-fork:package.json#specificcommit"

Et7f3XIV
  • 562
  • 1
  • 7
  • 20
  • What is the fork good for? Why can't I simply refer to the branch directly? – vog Sep 18 '19 at 07:34
  • actually nobody asked for this branch: so you can fork create a branch (so you can use it). And open PR if you want. If you want explain me what arg should be passed to the configure to enable `+fp`. And I will fork and do the necessary stuff. – Et7f3XIV Sep 18 '19 at 21:02
  • Thanks for the explanation! FWIW, I also raised this question on GitHub where I got the following, quite informative, response: https://github.com/esy-ocaml/ocaml/issues/31 – vog Sep 25 '19 at 13:44
  • 1
    Et7f3XIV: Thanks for the offer, but adding supporting for my particular use case feels like a waste of time for me, that would better be spent in providing automatisms to keep in sync with all ocaml-variants automatically. See my GitHub link for more information. – vog Sep 25 '19 at 13:54