[opam-devel] opam getting compiler version wrong
Drup
drupyog+caml at zoho.com
Sat Dec 10 20:36:08 GMT 2016
opam 2.0 upgrades the format automatically when pinning a repository
with an older opam format.
Le 10/12/2016 à 21:05, Anil Madhavapeddy a écrit :
> You can run "opam admin upgrade-format" to upgrade the repository, but I'm not sure of how to convert individual `opam` files. This seems like it would be useful in order to upgrade working repositories for pinning purposes...
>
> Anil
>
>> On 7 Dec 2016, at 21:52, Ashish Agarwal <agarwal1975 at gmail.com> wrote:
>>
>> Seems the issue is mis-interpretation of a deprecated constraint. I'm using Jane Street's opam repository [1], which contains constraints like:
>>
>> available: [ ocaml-version >= "4.03.0" ]
>>
>> After replacing this with a normal constraint in the `depends` field, it worked fine. Is there a tool to convert old opam files?
>>
>> [1] https://github.com/janestreet/opam-repository
>>
>>
>> On Wed, Dec 7, 2016 at 8:04 AM, Ashish Agarwal <agarwal1975 at gmail.com> wrote:
>> I'm getting this:
>>
>> $ opam install ppx_sexp_conv.114.10+84
>> [ERROR] ppx_sexp_conv.114.10+84 has unmet availability conditions: ocaml-version >= "4.03.0"
>>
>> So opam thinks my ocaml version is < 4.03.0, but I'm in a 4.03.0 switch. I've certainly run "eval `opam config env`". I created a new switch with 4.03.0 to try it from scratch, but get the same issue.
>>
>> Sanity checks:
>>
>> $ ocaml -version
>> The OCaml toplevel, version 4.03.0
>>
>> $ opam info ocaml | grep all-installed-versions
>> all-installed-versions 4.03.0 [4.03.0] 4.04.0 [4.04.0]
>>
>> Incidentally, I'm confused about the output of `opam info ocaml`. I have 6 switches on this computer. How come only 2 are listed above?
>>
>> $ opam --version
>> 2.0~alpha5
>>
>>
>> _______________________________________________
>> opam-devel mailing list
>> opam-devel at lists.ocaml.org
>> http://lists.ocaml.org/listinfo/opam-devel
> _______________________________________________
> opam-devel mailing list
> opam-devel at lists.ocaml.org
> http://lists.ocaml.org/listinfo/opam-devel
More information about the opam-devel
mailing list