-
Notifications
You must be signed in to change notification settings - Fork 348
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 "switch create" does not work with -w (--working-dir) #5060
Comments
I see what is happening here. As working dir is requested, no source synchronisation is done. In fact it is not supposed to be given at switch creation with a repository packages. Opam shouldn't let you do that, or at least handle this specific case. |
@rjbou I'm using "-w" for "opam install", saw that it is a common option, and used it for "switch create" as well. In opam 2.0.x this worked without issues, but the upgrade to 2.1.2 made it suddenly fail. If "-w" is not supposed to work with all commands, maybe the documentation / "--help" output should be improved? As a related note, I get strange errors on "opam install" as well, when using "-w", no matter if I do this on a version controlled or an unversioned directory. For example, installing package "ocaml-syntax-shims" into a 4.06.0 switch in a Git versioned directory leads to (but succeeds when "-w" is left out):
As another example, installing package "xmlm" into a 4.06.0 switch in a Git versioned directory leads to (but succeeds when "-w" is left out):
|
the manpage specifies that it have effect on locally pinned packages, so it should be a no-op in your case. For the other errors, can you give the process to reproduce ? Like that i'll add them too to the test suite a fix in the same time. See also this PR #4879, it fixes a very specific case too |
Okay, so here is how to reproduce the "opam install" errors. Some notes upfront:
Steps to reproduce:
Error message for ocaml-syntax-shims:
Error message for xmlm:
|
Thanks for the detailled reports! PR opened |
The opam sub command "switch create" does not work with -w (--working-dir).
Steps to reproduce:
Output:
Remarks:
The text was updated successfully, but these errors were encountered: