[opam-devel] Does pin git:// really make sense ?

Daniel Bünzli daniel.buenzli at erratique.ch
Mon Jun 3 10:38:17 BST 2013

Le lundi, 3 juin 2013 à 09:38, Anil Madhavapeddy a écrit :
> > Actually what I want at the moment is an easy way to install the repo version of ocp-indent. I guess since it doesn't install at the moment with pin the package description will have to be updated anyway. The idea is to avoid these things of becoming desynchronized.
> I wonder if an upstream opam-repository-unstable makes sense here, which always points to the bleeding-edge version of a package. This would also be useful for OCamlot to test, although very prone to breakage. @dsheets, any thoughts on this?

I don't think that would really help as long as there is no mechanism by which a package can somehow auto-update its own description when it changes. That's the problem, not accessing the bleeding edge source, opam pin handles that very well.

I think there's a use case that is not well covered here, which is pre-release/blocking bug in a package. What you really want is pin a package to the git repo but maybe only for a few days (like I wanted with ocp-indent), but of course the repos may not have the correct build instructions, so you want a lightweight way of being able to specify the new ones. For me it seems natural to try to lookup that in the repo itself.  



P.S. Just for the record that's the way I handled the ocp-indent problem, I'm sure it could be simpler:

1. opam pin ocp-indent git://
2. edit description in ./opam/repo/opam-repository to remove useless patch that was making the build fail.
3. rm ~/.opam/state.cache
4. opam install ocp-indent
5. opam update, will tell you that ocp-indent updated (a new (the old) description was detected)
6. opam upgrade --fake

More information about the opam-devel mailing list