[ocaml-platform] Dev Version as Package?
Thomas Gazagnaire
thomas at gazagnaire.org
Wed May 6 14:05:03 BST 2015
> ```
> opam remote remove shadow-opam-repository
> opam remote add shadow-opam-repository ./opam-repository
> opam update
> opam pin add --no-action project ./ -y
> opam install --deps-only project -y
> ```
>
> 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.
That's pretty neat! Would maybe be nice to support relative url in the packages to store the local package in the local repository, so you don't have to pin.
> That being said, having to depend on such a repository is a pain. What we would really to do from a user perspective is to have something like that in the project opam file
>
> ```
> opam-version: "1.2"
> ...
> depends: [
> "asn1-combinators" { = "0.1.1" }
> ...
> "foo" { git: "path-to-git/foo#bar"}
> ]
> ```
Louis will tell you (with reason) that by doing so you will need a fix-point resolver (as the "foo" package which introduce some yet unknown new constraints in your system) so this scheme is pretty difficult to implement.
That being said, that would be nice to have a way to easily import a list of pinned package. Need to double-check but I think that `opam switch export/import` preserves the pin packages so that should be enough for your use case.
Thomas
> On Tue, May 5, 2015 at 9:19 PM, Malcolm Matalka <mmatalka at gmail.com <mailto:mmatalka at gmail.com>> wrote:
> Each project I have has its own opam repo which I put as higher priority
> to the basic one. Does this do what you want?
>
> Trevor Smith <trevorsummerssmith at gmail.com <mailto:trevorsummerssmith at gmail.com>> writes:
>
> > Hi all,
> >
> > We're using opam internally at work. I have two use cases for our internal
> > libraries:
> >
> > 1) "dev dependencies" -- I want what is in the repo.
> > 2) "explicit dependency" -- I want a given version.
> >
> > opam has #2 covered.
> >
> > However it is not clear to me how to do #1 correctly. I can, on a given
> > machine (ie not on an opam repository), pin a given package to a git repo.
> > But locally pinning isn't what I want. I want a package in an opam
> > repository to say "I depend upon this other dev package" so that our build
> > boxes, and various developer machines will all do the same thing, and I
> > don't need to separately pin everything on each box.
> >
> > Has anyone else encountered this situation before?
> >
> > Thoughts? Thanks.
> >
> > Trevor
> > _______________________________________________
> > Platform mailing list
> > Platform at lists.ocaml.org <mailto:Platform at lists.ocaml.org>
> > http://lists.ocaml.org/listinfo/platform <http://lists.ocaml.org/listinfo/platform>
> _______________________________________________
> Platform mailing list
> Platform at lists.ocaml.org <mailto:Platform at lists.ocaml.org>
> http://lists.ocaml.org/listinfo/platform <http://lists.ocaml.org/listinfo/platform>
>
> _______________________________________________
> Platform mailing list
> Platform at lists.ocaml.org
> http://lists.ocaml.org/listinfo/platform
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/platform/attachments/20150506/da59f037/attachment.html>
More information about the Platform
mailing list