opam icon indicating copy to clipboard operation
opam copied to clipboard

Fix lots of issues with autopin, deps-only, dev deps, depexts...

Open AltGr opened this issue 3 years ago • 4 comments

AltGr avatar Aug 09 '22 17:08 AltGr

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…

AltGr avatar Aug 14 '22 12:08 AltGr

Do we need at all to allow opam install ./foo2/foo.opam --deps-only when foo is already pinned to ./foo1 ?

I think it would make sense

kit-ty-kate avatar Aug 15 '22 11:08 kit-ty-kate

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!

AltGr avatar Sep 22 '22 13:09 AltGr

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.

AltGr avatar Sep 22 '22 13:09 AltGr