janestreet / opam-repository

Opam repository for the development version of Jane Street packages
101 stars 10 forks source link

cannot use with opam 2.0 #2

Closed agarwal closed 7 years ago

agarwal commented 7 years ago

AFAICT, it isn't possible to use this repo with opam 2.0. As I reported on the opam-devel mailing list, opam 2.0 gets confused with available: [ ocaml-version >= "4.03.0" ]. It says the constraint isn't satisfied even on switches with ocaml 4.03.0 or later.

Is there a known workaround or plans to move this repo to 2.0 format?

ghost commented 7 years ago

I didn't know the repo didn't work with opam 2.0. Should we replace this line by:

depends: [
   "ocaml" {>= "4.03.0"}
]

? Do you know if there is a way to make the opam file work with both opam 1.x and opam 2.0? Given that opam 2.0 is not released yet, I'm a bit reluctant to break compatibility with opam 1.x. It seems to me that opam 2.0 should at least not break compatibility immediately.

At worse we can setup a separate branch for opam 2.0.

agarwal commented 7 years ago

Should we replace this line by: depends: [ "ocaml" {>= "4.03.0"} ]

Yes, that's correct according to their blog.

However, I don't think this should be required. I have plenty of local pins still using the 1.2 opam file format with exactly the same available: [ocaml-version >= "4.03.0"] constraint. OPAM 2 seems to handle those fine. I haven't managed to isolate the exact issue but have reproduced it even from a fresh opam init. Maybe someone will reply to my post to opam-devel.

agarwal commented 7 years ago

FYI, the recommended way to convert your repo to version 2.0 is to run opam-admin upgrade-format. I suppose you can do that at some point in the future. I'll close this issue as there is nothing particular that can be done in the mean time to support both 1.2 and 2.0.