Normally OPAM metadata access is only needed at distribution
time and this is handled by
Topkg_care.Opam.File using the
However there is one case where we want to be able to access
the metadata from
Topkg: on pin builds where the
watermarking process needs to be run to turn
the repo into a pseudo-distribution.
Since we don't want
Topkg to have any dependency and that
opam currently doesn't allow to consult the fields of arbitrary
OPAM files (see
issue #2446) we
assume a pin build has the
topkg tool installed and call
to it to get the OPAM fields for watermarking (if
unavailable the watermarks are simply undefined).
(string * string list) list
val codec :
codecis a codec for OPAM file fields.
val fields :
Topkg.fpath -> (string * string list) list Topkg.result
fields fileare the fields of the OPAM file
filewhich are obtained by calling the