<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 21, 2016 at 3:13 AM, Tim Cuthbertson <span dir="ltr"><<a href="mailto:tim@gfxmonk.net" target="_blank">tim@gfxmonk.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On Thu, Jan 21, 2016 at 8:58 AM, David Scott <<a href="mailto:scott.dj@gmail.com">scott.dj@gmail.com</a>> wrote:<br>
><br>
><br>
> On Wed, Jan 20, 2016 at 9:34 PM, Tim Cuthbertson <<a href="mailto:tim@gfxmonk.net">tim@gfxmonk.net</a>> wrote:<br>
>><br>
>> I've used opam a bunch, but this is the first time I've tried creating<br>
>> my own package. It seems like I must be doing something dumb, but in<br>
>> order to test my package I'm setting up a new opam repository (opam<br>
>> init; opam switch create; then in that switch opam pin<br>
>> <path-to-git-checkout>).<br>
>><br>
>> Opam then tries to install `gup` (my package), but doesn't get very<br>
>> far because it doesn't install any of my dependencies! My opam file<br>
>> looks like:<br>
>><br>
>> opam-version: "1"<br>
>> name: "gup"<br>
>> version: "0.5.1"<br>
>> maintainer: "<a href="mailto:tim@gfxmonk.net">tim@gfxmonk.net</a>"<br>
>> depends: [<br>
>> "batteries"<br>
>> "cryptokit"<br>
>> "extunix"<br>
>> "lwt" { ">=2.5.1" }<br>
><br>
><br>
> Try changing this line to<br>
><br>
> "lwt" { >= "2.5.1" }<br>
><br>
> Cheers,<br>
> Dave<br>
<br>
</span>Aha! Thanks, Dave - that fixed it.<br>
<br>
Funnily enough I already suspected this line could be a problem, and I<br>
removed it but that didn't help. Remembering back, I must have done<br>
that when I had _another_ issue (accidentally had two `depends:` keys<br>
in my opam file). Since it obviously didn't fix _that_ problem, I<br>
mentally marked it as not the issue.<br>
<br>
Is my opam file above invalid? Or is it valid-but-not-what-I-meant?<br>
Given that it didn't install any of my dependencies it seems like it<br>
must have been invalid rather than just specifying a weird constraint<br>
/ tag for `lwt`. Is there some error I should have seen for having an<br>
invalid file?<br>
<div class=""><div class="h5"><br></div></div></blockquote><div><br></div><div>You can use `opam-lint`</div><div><br></div><div>The line with the wrong constraint "lwt" { ">=2.5.1" } gives me:</div><div><br></div><div><div> $ opam lint ./opam</div><div> Errors found in /..../opam:</div><div> error: File format error: at /.../opam:27:43, Expected a list of constraints</div></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">
Cheers,<br>
- Tim.<br>
_______________________________________________<br>
opam-devel mailing list<br>
<a href="mailto:opam-devel@lists.ocaml.org">opam-devel@lists.ocaml.org</a><br>
<a href="http://lists.ocaml.org/listinfo/opam-devel" rel="noreferrer" target="_blank">http://lists.ocaml.org/listinfo/opam-devel</a><br>
</div></div></blockquote></div><br></div></div>