opam install --locked
behavior may not be the one expected by users
#5521
Labels
opam install --locked
behavior may not be the one expected by users
#5521
Currently,
opam install --locked
means thatopam
will use a file.opam.locked
, if it exists, instead of the.opam
file, not even looking at the content of it.As a consequence, if you add a dependency in your
.opam
file,opam install --locked
will not install that dependency, as it only reads the.opam.locked
file.Users may expect that
opam install --locked
would read both files, and merge the constraints, i.e. the.locked
file is only adding constraints on the.opam
file, so that the behavior would be:.locked
file are usedopam install --locked
would fail with an advice to remove the.locked
file as it is probably obsoleteThis behavior is typically important for tools that want to correctly manage
.opam
and.locked
files automatically, for example to mimiccargo
's behavior.The text was updated successfully, but these errors were encountered: