<div dir="ltr">Wow! Excited to see everyone jumping in. I appreciate everyone's contributions. Helpful to see how different people are dealing with this.<div><br></div><div>@Thomas you pointed me in the direction of what I needed. I see that I overlooked that on reading about repositories, and it is documented at: <a href="http://opam.ocaml.org/doc/Manual.html#Repospecification">http://opam.ocaml.org/doc/Manual.html#Repospecification</a></div><div><br></div><div>What I want to do is emulate Maven SNAPSHOT functionality (described here: <a href="http://stackoverflow.com/questions/5901378/what-exactly-is-a-maven-snapshot-and-why-do-we-need-it">http://stackoverflow.com/questions/5901378/what-exactly-is-a-maven-snapshot-and-why-do-we-need-it</a>).</div><div><br></div><div>I'm going to try to have an internal opam repo with {package-name}.dev for all internal libraries. This dev version will reference a git repo in the url file. Dependent projects will reference dev as we are building. When we make a release we'll do the normal thing and create a version. This strategy should scale well -- if one has multiple concurrent long-lived versions one can use version "-dev" (again as in Maven SNAPSHOTS). If this ends up serving us well I'll shoot out a blog post about it as it seems there is a lot of interest and different solutions around this topic.</div><div><br></div><div>Thoughts? Thanks again for everyone's input.</div><div><br></div><div>Trevor</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 5, 2015 at 3:42 PM, Thomas Braibant <span dir="ltr"><<a href="mailto:thomas.braibant@gmail.com" target="_blank">thomas.braibant@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, <div><br></div><div>We faced this issue at work too. The typical issue is "I want to depend on this particular branch of a third party repository". Pinning packages locally would work, but we want something that we can push on CI and build servers, and share in the team (and keep in the git history of the project). </div><div><br></div><div>The solution we came up with is as follows: in our dev repository `project`, we keep a particular opam repository `project/opam-repository`. This repository contains shadow opam packages. For instance, if I want to depend on branch bar of a public project foo, we just add a new version of the opam package for foo in `project/opam-repository/packages`, with an explicit version number, and with an url like `path-to-project-foo#bar`. Then, we keep a opam file in `project` that specifies the explicit dependencies (given version of public package) and the dev dependencies (home brewed version of public packages). The dev dependencies can only be met using the shadow opam files. </div><div><br></div><div>Then, our CI/build scripts use something like </div><div>```</div><div>opam remote remove shadow-opam-repository </div><div>opam remote add shadow-opam-repository ./opam-repository</div><div>opam update</div><div>opam pin add --no-action project ./ -y </div><div>opam install --deps-only project -y</div><div>```</div><div><br></div><div>Changing version of packages for all devs and our servers is done by commiting changes either to the opam-repository or to the opam file in the project.</div><div><br></div><div>Hope that helps. </div><span class="HOEnZb"><font color="#888888"><div>Thomas</div><div><br></div><div><br></div><div><br></div><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 5, 2015 at 9:19 PM, Malcolm Matalka <span dir="ltr"><<a href="mailto:mmatalka@gmail.com" target="_blank">mmatalka@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Each project I have has its own opam repo which I put as higher priority<br>
to the basic one.  Does this do what you want?<br>
<div><div><br>
Trevor Smith <<a href="mailto:trevorsummerssmith@gmail.com" target="_blank">trevorsummerssmith@gmail.com</a>> writes:<br>
<br>
> Hi all,<br>
><br>
> We're using opam internally at work. I have two use cases for our internal<br>
> libraries:<br>
><br>
> 1) "dev dependencies" -- I want what is in the repo.<br>
> 2) "explicit dependency" -- I want a given version.<br>
><br>
> opam has #2 covered.<br>
><br>
> However it is not clear to me how to do #1 correctly. I can, on a given<br>
> machine (ie not on an opam repository), pin a given package to a git repo.<br>
> But locally pinning isn't what I want. I want a package in an opam<br>
> repository to say "I depend upon this other dev package" so that our build<br>
> boxes, and various developer machines will all do the same thing, and I<br>
> don't need to separately pin everything on each box.<br>
><br>
> Has anyone else encountered this situation before?<br>
><br>
> Thoughts? Thanks.<br>
><br>
> Trevor<br>
</div></div><div><div>> _______________________________________________<br>
> Platform mailing list<br>
> <a href="mailto:Platform@lists.ocaml.org" target="_blank">Platform@lists.ocaml.org</a><br>
> <a href="http://lists.ocaml.org/listinfo/platform" target="_blank">http://lists.ocaml.org/listinfo/platform</a><br>
_______________________________________________<br>
Platform mailing list<br>
<a href="mailto:Platform@lists.ocaml.org" target="_blank">Platform@lists.ocaml.org</a><br>
<a href="http://lists.ocaml.org/listinfo/platform" target="_blank">http://lists.ocaml.org/listinfo/platform</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>