[opam-devel] the available field in 1.1.1

Thomas Gazagnaire thomas at gazagnaire.org
Sun Aug 31 13:35:43 BST 2014


>> +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") ]

>> 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!

Thomas


More information about the opam-devel mailing list