opam
opam copied to clipboard
Fix lots of issues with autopin, deps-only, dev deps, depexts...
Grmbl I think I found yet another issue : if the package is already pinned, but to a different target, and running with --deps-only, it seems the correct opam file is not used (at least I had new dependencies not getting picked up).
It's pretty complex though: we should not update the pinning with the new URL, yet we need to recover the opam file for the current target.
Do we need at all to allow opam install ./foo2/foo.opam --deps-only when foo is already pinned to ./foo1 ?
(it's not that far-fetched if you consider usage of git worktree without local switches for each of them)
EDIT: the issue I had was actually with the pinning bing on a different branch; bad interaction with git worktree ?
EDIT2: we might be confused by the git update return status in this case…
Do we need at all to allow
opam install ./foo2/foo.opam --deps-onlywhenfoois already pinned to./foo1?
I think it would make sense
Just update this:
- now based on #5295 → should be rebased once (if) merged
- re-added the changelog patch
- the norepo test is great!
@rjbou I :heavy_check_mark: and give you back the control on this. Thanks!
Note: https://github.com/ocaml/opam/pull/5236#issuecomment-1214361502 is still valid & we shouldn't forget to open a separate issue if still present once this is merged.