From anil at recoil.org Thu Dec 8 12:29:15 2016 From: anil at recoil.org (Anil Madhavapeddy) Date: Thu, 8 Dec 2016 12:29:15 +0000 Subject: [ocaml-platform] [ocaml-infra] OPAM: Depend on particular git commit? In-Reply-To: <29fddf6b-664f-2fe3-f55b-e29756dcfaa6@ralfj.de> References: <29fddf6b-664f-2fe3-f55b-e29756dcfaa6@ralfj.de> Message-ID: <38FAFA65-729A-4298-94BC-6AE3F6FD4136@recoil.org> [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 ` of the OPAM remote to pull in the new package descriptions. regards, Anil > On 24 Nov 2016, at 14:52, Ralf Jung 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 >