robur-coop / udns

[deprecated, developmeht moved to https://github.com/mirage/ocaml-dns] µDNS - an opinionated Domain Name System (DNS) library
BSD 2-Clause "Simplified" License
55 stars 5 forks source link

Difficulty pinning packages in development #28

Closed cfcs closed 5 years ago

cfcs commented 5 years ago

After this was introduced in https://github.com/roburio/udns/commit/8ad2bcca0c564374ab3225ada324252f21828617 I'm struggling to pin local development branches. Here's what I tried:

$ opam pin add -n dns --dev -k git git+https://github.com/roburio/udns.git
# ...
$ opam pin add -n dns-client --dev -k git git+https://github.com/roburio/udns.git
# ...
$ opam install dns

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[dns.1.1.1] no changes from git+https://github.com/roburio/udns.git

[NOTE] Package dns is already installed (current version is 1.1.1).
$ opam install dns-client.1.1.1
[ERROR] Package dns-client has no version 1.1.1.
$ opam install dns-client

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[dns-client.~dev] no changes from git+https://github.com/roburio/udns.git

Sorry, no solution found: there seems to be a problem with your request.

No solution found, exiting

My local workaround was:

$ sed -i 's/"dns"/#&/' dns-client.opam
$ opam pin add -n dns-client --dev '.'
$ opam install --working-dir dns-client

Is there a more ergonomic way to work with a development version?

ping @hannesm

hannesm commented 5 years ago

you can as well opam pin add dns-client.2.0.0 --dev (for all packages, include a version number) to avoid running into conflicts.

cfcs commented 5 years ago

Thanks, this worked!