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

Anil Madhavapeddy anil at recoil.org
Thu May 30 13:59:54 BST 2013


The purpose of separating the source (from git) from the version number (in the package description or pin command) is to let the developer control constraints better.

Pinning a newer version can result in recompilations due to dependent package constraints changing, so it's useful to be able to specify the version number during the pin.

Merging ocamlfind/OPAM/oasis in the long-term makes sense, but OPAM in its current incarnation is very much a wrapper for all these other build and packaging systems.  This will improve in time...

-anil

On 30 May 2013, at 13:01, Daniel Bünzli <daniel.buenzli at erratique.ch> wrote:

> If I understand correctly if I pin a package on a git url, it uses the last known description of the corresponding package to try to build the package. If that's the correct I think it doesn't make sense in general. Concrete example at the end of this email.
> 
> Shouldn't there be some mechanism so that it can get the opam file from the git repo itself ?  
> 
> But then at that point the distinction between git repo and package becomes quite small and they could be merged as this could drastically simplify the distribution process (versions would just point to a specific git  commit, and things like ocamlpro's opam repository would reference them). I mean in my world a distribution is just a checkout + transformation applied on the result [1]. I wouldn't mind stopping distributing tarballs and have all the info in the git repository.
> 
> Also another issue about pin is that the version mentioned in `opam list` lies it should really try to use `git describe`. In my opam unstable repo which has only git packages and specific build instructions for building directly from the git checkout I use repo for the version name, this implies that `opam list` tells `repo` and I use `git describe` in the build instruction so that `ocamlfind list` tells me precisely which version is installed.  
> 
> Note that with the time this two-headed structure opam/ocamlfind seems stranger and stranger and I wonder if the tools should not merge at a certain point.  
> 
> Daniel
> 
> [1] This could however be a little bit more problematic for distributions that contain generated data that's a little bit painful to generate on each client (like uunf http://erratique.ch/software/uunf who needs to extract data from the unicode character database and substitute it in the source code before making a distribution, though that could be checked in another "derived" repo)
> 
> 
>> opam pin ocp-indent git://github.com/OCamlPro/ocp-indent.git
>> opam install ocp-indent
> The following actions will be performed:
> - install ocp-indent.1.2.0
> 1 to install | 0 to reinstall | 0 to upgrade | 0 to downgrade | 0 to remove
> 🐫 Installing ocp-indent.1.2.0  
> Synchronizing ~/.opam/4.00.1/pinned.cache/ocp-indent with git://github.com/OCamlPro/ocp-indent.git.
> Applying warnings.patch.
> The compilation of ocp-indent.1.2.0 failed.
> Uninstalling ocp-indent.1.2.0:
> ./configure --prefix /Users/dbuenzli/.opam/4.00.1
> make uninstall
> ==== ERROR [while installing ocp-indent.1.2.0] ====
> Internal error:
> Cannot find /Users/dbuenzli/.opam/4.00.1/build/ocp-indent.1.2.0/warnings.patch.
> 'opam install ocp-indent' failed.
> 
> 
> 
> _______________________________________________
> opam-devel mailing list
> opam-devel at lists.ocaml.org
> http://lists.ocaml.org/listinfo/opam-devel



More information about the opam-devel mailing list