[opam-devel] the available field in 1.1.1

Thomas Gazagnaire thomas at gazagnaire.org
Sun Aug 31 10:30:52 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") ]

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

Thomas



More information about the opam-devel mailing list