[opam-devel] the available field in 1.1.1

Anil Madhavapeddy anil at recoil.org
Sun Aug 31 15:03:26 BST 2014


On 31 Aug 2014, at 13:35, Thomas Gazagnaire <thomas at gazagnaire.org> wrote:

>>> +available: [ !preinstalled & ocaml-version = "4.02.0" ]
>>> 
>>> This works fine OPAM 1.2, but OPAM 1.1.1 complains with a parse error.  Is there
>>> anything that'll work for both?
>> 
>> The parser in 1.1.1 was a bit dumb, you need to add parenthesis:
>> 
>> available: [ !preinstalled & (ocaml-version = "4.02.0")
>> ]
> 
> Actually, 1.1.1 parser is very broken ... You should use:
> [ (preinstalled = false) & (ocaml-version = "4.02.0") ]

Thanks, this is now pushed and building in the pull request (along with a help message to point people at camlp4 binaries).

> 
>>> errors are:
>>> [WARNING] Errors while parsing camlp4.4.02.0 OPAM file, skipping.
>>> [WARNING] Errors while parsing camlp4.4.02.0+system OPAM file, skipping.
>>> [WARNING] Errors while parsing camlp4.4.02.0 OPAM file, skipping.
>>> [WARNING] Errors while parsing camlp4.4.02.0+system OPAM file, skipping.
>>> 
>>> (Also, an env var to turn these parse warnings into failures would be a useful Travis knob to have in 1.2 perhaps)
>> 
>> You can use --strict or set OPAMSTRICT to a non null value.
> 
> And it seems that `opam update --strict` does not really care about the --strict option.
> 
> But at least, parser error messages in 1.2 are great!

Splendid :) Is OPAMSTRICT working in OPAM 1.2?  This will be helpful since
there are known warnings in 1.1 that should disappear in 1.2.

-anil


More information about the opam-devel mailing list