Difficulty pinning packages in development
Closed this issue · 2 comments
cfcs commented
After this was introduced in 8ad2bcc 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
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
Thanks, this worked!