ygrek / ocurl

OCaml bindings to libcurl
https://ygrek.org/p/ocurl
MIT License
60 stars 32 forks source link

opam pin fails because of transitional curl package #74

Open ygrek opened 7 months ago

ygrek commented 7 months ago

pinning to dev-repo doesn't work (will work after curl release?)

$ opam pin ocurl --dev-repo
[ocurl.0.9.2] synchronised (git+https://github.com/ygrek/ocurl.git)
ocurl is now pinned to git+https://github.com/ygrek/ocurl.git (version 0.9.2)

[ERROR] Package conflict!
  * Missing dependency:
    - curl
    unknown package

cloning and pinning doesn't work (due to opam bug?)

$ git clone https://github.com/ygrek/ocurl.git
Cloning into 'ocurl'...
[...]
$ opam pin ocurl
This will pin the following packages: curl, ocurl. Continue? [Y/n] y
Package curl does not exist, create as a NEW package? [Y/n] y
curl is now pinned to git+file:///tmp/ocurl#master (version ~dev)
ocurl is now pinned to git+file:///tmp/ocurl#master (version 0.9.2)

[ERROR] Package conflict!
  * Missing dependency:
    - curl >= 0.9.2
    no matching version

the way that works :

$ opam pin ocurl --with-version=~dev
This will pin the following packages: curl, ocurl. Continue? [Y/n] y
Package curl does not exist, create as a NEW package? [Y/n] y
curl is now pinned to git+file:///tmp/ocurl#master (version ~dev)
ocurl is now pinned to git+file:///tmp/ocurl#master (version ~dev)
[...]
psafont commented 7 months ago

I believe this to be an issue with how opam works. The same issue happens when pinning https://github.com/gildor478/ounit:

opam pin .
This will pin the following packages: ounit-lwt, ounit, ounit2-lwt, ounit2. Continue? [y/n] y
Package ounit-lwt does not exist, create as a NEW package? [y/n] y
ounit-lwt is now pinned to git+file:///home/paus/code/ocaml/ounit#master (version dev)
ounit is now pinned to git+file:///home/paus/code/ocaml/ounit#master (version 2.2.7)
Package ounit2-lwt does not exist, create as a NEW package? [y/n] y
ounit2-lwt is now pinned to git+file:///home/paus/code/ocaml/ounit#master (version dev)
ounit2 is now pinned to git+file:///home/paus/code/ocaml/ounit#master (version 2.2.7)

[ERROR] Package conflict!
  * Missing dependency:
    - ounit2 >= dev
    no matching version

(the output is different because I'm using opem 2.2.0)

The installation of the packages works fine when using the released versions