Skip to content
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 pin remove behaviour #3630

Closed
dbuenzli opened this issue Oct 25, 2018 · 9 comments · Fixed by #4073
Closed

opam pin remove behaviour #3630

dbuenzli opened this issue Oct 25, 2018 · 9 comments · Fixed by #4073

Comments

@dbuenzli
Copy link
Contributor

I think this used to work in the v2 betas but it seems it no longer.

When you release you usually have the package you release as a pin on the current version X. You submit to the opam repo version X+1. Then when you opam update and have the update X+1 from the OCaml opam repository, you want to remove the pin and recompile with X+1. The current behaviour when you opam pin remove is to recompile with X which is annoying if your package has many deps, since you have to follow with a recompile with X+1.

@rjbou
Copy link
Collaborator

rjbou commented Dec 18, 2019

It's only if version X is present in the repo. It has been designed that way, since 1.2.1.
(sorry for delay)

@dbuenzli
Copy link
Contributor Author

I don't understand your answer.

@dbuenzli
Copy link
Contributor Author

If that's not clear what I'm asking is that when you remove a dev pin it tries to install the latest version of the package not the version that was there when you pinned.

@rjbou
Copy link
Collaborator

rjbou commented Dec 18, 2019

It's clear :) What I wanted to say (with few words) is that there is two processes:

  • unpin package version X, and version X exists in opam repository → opam reinstall package version X
  • unpin package version X, and version X absent from opam repository → opam reinstall package to its last version (X+1 here)

It's a design choice, that can be discussed ofc.

@dbuenzli
Copy link
Contributor Author

Thanks. There are a few things that are related to this which are

#3202
#2932

@dbuenzli
Copy link
Contributor Author

IIRC there's actually a workaround -- the problem is that I usually forget about it and blindly issue an opam pin remove cmdliner and then I'm very sad. I think what you have to do is opam pin remove PKG -n and then opam upgrade PKG.

I was always a bit uncomfortable with it because you basically you go through an inconsistent switch state.

But if people consider that's good enough maybe it's not worth changing/complexifying things and this can be closed. (I let you do if you think so)

@rjbou
Copy link
Collaborator

rjbou commented Jan 7, 2020

After discussion with @AltGr, it makes sense to remove that specific behaviour, in order to always have the last repo version of the newly unpinned package.

@rjbou
Copy link
Collaborator

rjbou commented Jun 3, 2020

Thanks!

@rjbou rjbou added this to the 2.1.0~alpha2 milestone Jun 3, 2020
@dbuenzli
Copy link
Contributor Author

dbuenzli commented Jun 3, 2020

Excellent !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants