Skip to content
This repository has been archived by the owner on Jun 30, 2019. It is now read-only.

Difficulty pinning packages in development #28

Closed
cfcs opened this issue Jun 4, 2019 · 2 comments
Closed

Difficulty pinning packages in development #28

cfcs opened this issue Jun 4, 2019 · 2 comments

Comments

@cfcs
Copy link
Contributor

cfcs commented Jun 4, 2019

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
Copy link
Contributor

hannesm commented Jun 12, 2019

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.

@hannesm hannesm closed this as completed Jun 12, 2019
@cfcs
Copy link
Contributor Author

cfcs commented Jun 17, 2019

Thanks, this worked!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants