[opam-devel] pinned package not installing dependencies

Sebastien Mondet sebastien.mondet at gmail.com
Thu Jan 21 13:16:38 GMT 2016


On Thu, Jan 21, 2016 at 3:13 AM, Tim Cuthbertson <tim at gfxmonk.net> wrote:

> On Thu, Jan 21, 2016 at 8:58 AM, David Scott <scott.dj at gmail.com> wrote:
> >
> >
> > On Wed, Jan 20, 2016 at 9:34 PM, Tim Cuthbertson <tim at gfxmonk.net>
> wrote:
> >>
> >> I've used opam a bunch, but this is the first time I've tried creating
> >> my own package. It seems like I must be doing something dumb, but in
> >> order to test my package I'm setting up a new opam repository (opam
> >> init; opam switch create; then in that switch opam pin
> >> <path-to-git-checkout>).
> >>
> >> Opam then tries to install `gup` (my package), but doesn't get very
> >> far because it doesn't install any of my dependencies! My opam file
> >> looks like:
> >>
> >>     opam-version: "1"
> >>     name: "gup"
> >>     version: "0.5.1"
> >>     maintainer: "tim at gfxmonk.net"
> >>     depends: [
> >>      "batteries"
> >>      "cryptokit"
> >>      "extunix"
> >>      "lwt" { ">=2.5.1" }
> >
> >
> > Try changing this line to
> >
> >   "lwt" { >= "2.5.1" }
> >
> > Cheers,
> > Dave
>
> Aha! Thanks, Dave - that fixed it.
>
> Funnily enough I already suspected this line could be a problem, and I
> removed it but that didn't help. Remembering back, I must have done
> that when I had _another_ issue (accidentally had two `depends:` keys
> in my opam file). Since it obviously didn't fix _that_ problem, I
> mentally marked it as not the issue.
>
> Is my opam file above invalid? Or is it valid-but-not-what-I-meant?
> Given that it didn't install any of my dependencies it seems like it
> must have been invalid rather than just specifying a weird constraint
> / tag for `lwt`. Is there some error I should have seen for having an
> invalid file?
>
>
You can use `opam-lint`

The line with the wrong constraint  "lwt"  { ">=2.5.1" } gives me:

    $ opam lint ./opam
    Errors found in /..../opam:
       error: File format error: at /.../opam:27:43, Expected a list of
constraints




> Cheers,
>  - Tim.
> _______________________________________________
> opam-devel mailing list
> opam-devel at lists.ocaml.org
> http://lists.ocaml.org/listinfo/opam-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/opam-devel/attachments/20160121/67f5dbef/attachment.html>


More information about the opam-devel mailing list