Open jonsterling opened 1 year ago
Thanks for reporting! I had a similar issue with just opam install . --deps-only
while the opam file with updated dependencies was properly committed.
It follows that this is unlikely to be related to --working-dir
, and more probably due to the way the local opam
file needs to be picked in advance when using a directory for package...
I had the same bug with Jasmin, without --working-dir
. opam install . --deps-only
at the root does not install coq-mathcomp-algebra
(among others), and moreover does not report the package as unknown when it does not know it (I initially forgot to add https://coq.inria.fr/opam/released as another remote, so coq-mathcomp-algebra
was unknown).
Version: 2.2.0~beta1
As far as I can tell, the
--working-dir
option ofopam
is not functional. I cannot tell if this is my own misunderstanding of what--working-dir
or--deps-only
are supposed to do, but this has happened often enough for me that I thought I would report it as a bug.What happens
I have a program I am developing, and I have added a new dependency to my
.opam
file. In this case, I added a dependency onptime
. I now wish to bring my current switch into alignment with the dependencies specified by my project. Note that I have not committed this change ingit
. Therefore, I run the commandopam install . --deps-only --working-dir
, which the documentation has led me to believe will do the following: it should install the dependencies of the package specified in the current directory, and it should read the version of the.opam
file that is currently in the working directory rather than the one that is committed to version control.Here is what actually happens:
I believe this behavior is either wrong or highly unintuitive; in the latter case, maybe we could come up with something to add to the documentation to clarify the intended function of these options.
What if I commit the change and don't use
--working-dir
?When I commit the change to my
.opam
file and runopam install . --deps-only
, thenopam
correctly offers to installptime
.Diagnostic information
My
.opam
fileYou can also find the source repository here if you wish to reproduce on your own: https://github.com/jonsterling/ocaml-forester
opam config report
:opam list
As you can see, the package
ptime
is not installed.