Skip to content

Document the "opam package version-string resolution"? #4239

@erikmd

Description

@erikmd

.opam file specifications directly-committed in source repositories do not usually contain a version,
and I believe the "opam package (version-string) resolution" (namely, the order in which the various places potentially-containing a package (and thereby specifying a version) are queried when installing a given package name) is not directly documented in the opam manual. Hence this issue :)

Actually beyond the code itself, I only found that other issue #2932 (comment) by @jeremiedimino that mentioned this:

  1. use the version specified on the command line, if any
  2. use the version: field in the opam file of the pinned package, if any
  3. use the latest version available in the package repository, if a package with the same name already exists
  4. ~unknown with opam1 and ~dev (+dev?) with opam2

(I also Cc @ejgallego, @Zimmi48, @CohenCyril, @affeldt-aist as we recently discussed of that feature in some GitHub issues
(the issues being rocq-prover/rocq#11038, math-comp/analysis#218 just FTR))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions