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

Add pin expiration system (--dev-until-next-release) #3202

Open
kit-ty-kate opened this issue Jan 31, 2018 · 8 comments
Open

Add pin expiration system (--dev-until-next-release) #3202

kit-ty-kate opened this issue Jan 31, 2018 · 8 comments

Comments

@kit-ty-kate
Copy link
Member

Idea by @AltGr

It would be nice to add some kind of flag to a pinned package that tells opam to remove it in case a new release has been found while updating.

This feature could take the form of an option given to opam add: --dev-until-next-release.
Maybe it would be good to also add a set-expiration subcommand, as follow:

$ opam pin add pkg some-dir
$ opam pin set-expiration pkg until-next-release
$ opam pin set-expiration pkg never
@dbuenzli
Copy link
Contributor

Which default would you expect ? (I would balance on until-next-release)

@kit-ty-kate
Copy link
Member Author

I would say: never, to keep the backward compatibility.

@dbuenzli
Copy link
Contributor

I'd argue that most people pin with the intent of until-next-release.

@dbuenzli
Copy link
Contributor

Another thing to consider is that if we find a way to properly solve #2932 that would automatically happen by virtue of version comparison.

@dbuenzli
Copy link
Contributor

(In the sense that you would not pin but opam install --dev)

@Drup
Copy link
Contributor

Drup commented Feb 1, 2018

I'd argue that most people pin with the intent of until-next-release.

I don't know about most people, but I know that would annoy me greatly, and would probably cause me a great deal of frustration because something that was pin is now unpinned without any instruction from me and I forgot about that feature.

So, I vote for the non-clever thing by default, and only enable the clever thing with a flag.

@dbuenzli
Copy link
Contributor

dbuenzli commented Feb 1, 2018

@Drup I kind of agree with you, pin should be pin. I think the natural thing to do here is to eschew the concept of "pin expirations" and introduce the notion of --dev installs.

@AltGr
Copy link
Member

AltGr commented Feb 2, 2018

A "dev" pin could actually be different in two ways:

  • pin to a specific source version (e.g. a git-hash) ; or simply skip updating the pin unless explicit. Because currently pin --dev would pin to git and then update to master on every opam update, and it's not what the user would wish in this case.
  • unpin as soon as a new version of the package appears, in any repository.

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

No branches or pull requests

4 participants