Open avsm opened 6 years ago
I'm also noticing that the output of opam show --normalise
can't always be parsed by OpamParser.value_of_string
. If there is an empty string, a Parsing_error
is raised.
Also would it be possible to only report what is in the file when this is performed on an opam file; it seems that opam
will invent things in some cases (here on an opam
file that has no version:
field):
> opam show ./opam -f version:,homepage: --normalise --no-lint
version: "~dev"
homepage: ["bla" "bli" "blo"]
It have its origins in opam-file-format. If we change the printer at this stage, it will change opam printing for all tools, even camelus. Meanwhile, it is possible to pin for the CI a version of opam-file-format
that "disable" that formatting.
This is frustratingly hard to parse from a shell script :)
If
opam show
would just make every list entry into a newline, it would be so much simpler to parse with line-oriented tools in a shell. Using--normalise
adds brackets and makes it harder to parse.