fix(*.opam): Add missing version "dev"#11038
Conversation
"dev" was not implied, and this can cause the following issues: --8<---------------cut here---------------start------------->8--- $ docker run --rm -it coqorg/base:latest coq@…:~$ opam update coq@…:~$ git clone https://github.com/coq/coq.git Cloning into 'coq'... coq@…:~$ cd coq coq@…:~/coq$ opam pin add -n -k path coq . [coq.8.10.1] synchronised from file:///home/coq/coq coq is now pinned to file:///home/coq/coq (version 8.10.1) # issue 1. opam picks the first version he finds for coq from repos… coq@…:~/coq$ mv coq.opam foo.opam coq@…:~/coq$ opam pin add -n -k path foo . Package foo does not exist, create as a NEW package? [Y/n] y [foo.~dev] synchronised from file:///home/coq/coq foo is now pinned to file:///home/coq/coq (version ~dev) # issue 2. if none is found, opam sticks to some "~dev" version… --8<---------------cut here---------------end--------------->8---
|
I am not sure this is going to work fine in the long run, see ocaml/opam#2932 and ocaml/dune#880 Keep in mind that we hope to remove the Maybe the pin command should specify the version? [I can't try right now sorry] |
Indeed I was able to grab my laptop for a minute seems to do what we want? |
|
Hi @ejgallego, thanks for your pointers! (this post in particular is useful to recap the algo applied here) I agree with several points from your response:
However, I still see some advantages of integrating this change because:
WDYT? Kind regards, Erik |
Zimmi48
left a comment
There was a problem hiding this comment.
I don't see any downside to merging this PR.
|
Hi @erikmd ,
I think the command is documented in the man page: "For source pinnings, the package version may be specified by using the format NAME.VERSION for PACKAGE, in the source opam file, or with edit."
This is indeed my main worry; I am OK merging this if you think it is useful; however we will regress again once Thus anyways users must be aware of the limitations of pinning, even if not ideal, an explicit version is the only safe choice today IMHO. |
|
Hi @ejgallego, thanks for your feedback!
OK.
Thanks! IMHO even if the issue I raised could show up later as you explained, I believe that merging this would be useful (especially for my arguments |
|
Ok, merging then! I do remain not very optimistic w.r.t. future of people using the commands in the way you describe, IMHO they will broken soon again so I recommend the explicit version. |
Kind: bug fix / infrastructure.
Added / updated test-suite[not relevant]Corresponding documentation was added / updated (including any warning and error messages added / removed / modified).[not relevant]Description
The opam version string "dev" was not implied, and this can cause the following issues:
Hence that PR.