Open kit-ty-kate opened 2 months ago
From dev meeting: the behaviour of:
-f field
--raw -f field
-f field:
--raw -f field:
is not clear. We might also want to error in case there is a newline character in case of lists. We might also want to think about interractions with --normalise
Some outputs that show the non standardised behaviour:
$ opam show --raw -f version ppxlib
"0.32.1~5.2preview"
$ opam show --raw -f version: ppxlib
$ opam show -f version: ppxlib
"0.32.1~5.2preview"
$ opam show -f version ppxlib
0.32.1~5.2preview
$ opam show -f url.src ppxlib
[ERROR] No printer for "url.src"
$ opam show -f url.src: ppxlib
"https://github.com/ocaml-ppx/ppxlib/archive/04e050cbe2cf3e5cdb4441c480e4f472a5033941.tar.gz"
$ opam show -f authors: ppxlib
"Jane Street Group, LLC <opensource@janestreet.com>"
$ opam show -f authors ppxlib
"Jane Street Group, LLC <opensource@janestreet.com>"
$ opam show -f authors opam
[ERROR] No package matching opam found
$ opam show -f authors opam-devel
"David Allsopp <david@tarides.com>"
"Vincent Bernardoff <vb@luminar.eu.org>"
"Raja Boujbel <raja.boujbel@ocamlpro.com>"
"Kate Deplaix <kit-ty-kate@outlook.com>"
"Roberto Di Cosmo <roberto@dicosmo.org>"
"Thomas Gazagnaire <thomas@gazagnaire.org>"
"Louis Gesbert <louis.gesbert@ocamlpro.com>"
"Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>"
"Anil Madhavapeddy <anil@recoil.org>"
"Guillem Rieu <guillem.rieu@ocamlpro.com>"
"Ralf Treinen <ralf.treinen@pps.jussieu.fr>"
"Frederic Tuong <tuong@users.gforge.inria.fr>"
$ opam show -f authors: opam-devel
"David Allsopp <david@tarides.com>"
"Vincent Bernardoff <vb@luminar.eu.org>"
"Raja Boujbel <raja.boujbel@ocamlpro.com>"
"Kate Deplaix <kit-ty-kate@outlook.com>"
"Roberto Di Cosmo <roberto@dicosmo.org>"
"Thomas Gazagnaire <thomas@gazagnaire.org>"
"Louis Gesbert <louis.gesbert@ocamlpro.com>"
"Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>"
"Anil Madhavapeddy <anil@recoil.org>"
"Guillem Rieu <guillem.rieu@ocamlpro.com>"
"Ralf Treinen <ralf.treinen@pps.jussieu.fr>"
"Frederic Tuong <tuong@users.gforge.inria.fr>"
$
For use in scripts, it would be nice to return values returned by
opam show --raw --field
without any qutotes.For example
opam show --raw -f url.src ppxlib
returns:and it would be nice if it returned