-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opam install . --deps-only --working-dir incorrectly reports "Nothing to do" #5567
Comments
Thanks for reporting! I had a similar issue with just It follows that this is unlikely to be related to |
I had the same bug with Jasmin, without Version: 2.2.0~beta1 |
I would love to get an update on this ticket. This is a very serious problem that users face on day one of introducing themselves to the OCaml ecosystem, and it seems like it should be a high priority to get it fixed. I think that one of the difficulties about getting it fixed is that it seems like it may be caused by more than one thing, so it could be difficult to isolate exactly what is going on. |
@jonsterling sorry for the annoyance. Until early July 2024 we were focused on the release of opam 2.2 and left issues and PRs aside (except for regressions) to avoid delaying it any longer. After the release we had a backlog of PRs and issues as long as 2 legs and 3 arms and we only recently got to see the end. Last month i tried to debug and fix this here issue (mentioned in #6101), but i switched to something else and that work was left in a git stash. Looking back at that stash the fix i looked into seems pretty involved, and doesn't fix your issue yet in its current state. I'm planning to continue working on it when i'm back from ICFP in September but as to when it'll be merged it'll depend on how involved the required fix is so i can't make any promises at that stage. I also encounter this issue from time to time and i agree it's fairly annoying but there are usually workarounds as it seems to appear only when the package(s) you're trying to install the dependencies of is pinned. |
@kit-ty-kate Thanks very much for the quick response, I'm sorry if I sounded like a broken record! It's great to see the ongoing progress here, and I know that you have a lot on your plate. Regarding Anyway, thanks for your work on improving OCaml tools! We're all very endebted. |
#6209 should fix this issue and should lend in opam 2.4.0 planned for April next year. A backport in 2.3.0 sounds unlikely given the fix touches some intricate part of the code and we would like to have a much time to test it in the wild as possible during the next release cycle. |
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.The text was updated successfully, but these errors were encountered: