[ocaml-platform] [ocaml-infra] OPAM: Depend on particular git commit?

Anil Madhavapeddy anil at recoil.org
Thu Dec 8 12:29:15 GMT 2016


[moving from infrastructure@ to platform at lists.ocaml.org]

Dear Ralf,

While you cannot specify dependencies directly in a dependency, you
can construct an OPAM remote that has `url` files that point directly
at the commit in question.

For example, https://github.com/mirage/mirage-dev has several such
instances with `url` files pointing to a specific fork or branch in git.

Your users will need to `opam repo add <name> <url>` of the OPAM
remote to pull in the new package descriptions.

regards,
Anil

> On 24 Nov 2016, at 14:52, Ralf Jung <post at ralfj.de> wrote:
> 
> Hi all,
> 
> I'm trying to use opam to express a highly volataile dependency, where
> project B wants to say "I need exactly git commit X of project A".
> Project A frequently has breaking changes, so just depending on "master"
> ("dev") is too coarse-grained.  Currently, we have a submodule in
> project B indicating the proper commit of project B, but with the
> dependency graph getting larger than two nodes, this stops scaling, so
> I'd like to use opam.  I tried putting the git URL
> ("https://.../projectA.git#X") into the "depends" of project B, but
> unfortunately that doesn't seem to be supported.
> 
> Is there another way to achieve a dependency on a particular git commit?
> 
> Kind regards,
> Ralf
> 
> _______________________________________________
> Infrastructure mailing list
> Infrastructure at lists.ocaml.org
> http://lists.ocaml.org/listinfo/infrastructure
> 



More information about the Platform mailing list