-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the vcs to get a version number for pinned package? #2932
Comments
The discussion should be broadened to |
Packages from a repository, including The rationale behind rule 3 is that you can plug in a direct replacement for a given package. In particular, all packages don't have to include an Inferring a version from the VCS would be quite nice. The issue I might have with it is that it won't work everywhere (people may not tag their releases, for example, or may tag them with a |
Sorry for the late reply, I had forgotten about this ticket. If we don't want to make assumption about project sources, we can make it an explicit opt-in. For instance by adding a variable to refer the version from the VCS. Then a user might write in their opam file:
And tools such as
|
Another idea: when pinned, many packages require a preparation step. For instance some Dune packages have |
It would be preferable to use opam's builtin version control logic if possible, so I prefer @diml's first idea of creating a |
Following the discussion on dbuenzli/topkg#111, I'd like to suggest to change the way opam assigns version numbers to pinned packages.
AFAIU, currently opam chooses the version for pinned packages as follow:
version:
field in the opam file of the pinned package, if any~unknown
with opam1 and~dev
(+dev
?) with opam2This can lead to inconsistencies between what opam thinks the version is and what other tools such as ocamlfind think the version is. I think especially rule 3 is problematic. For instance:
I suggest to change rule 3 to query the version from the vcs, when there is one, in a similar fashion to what topkg does for git and mercurial.
Alternatively, deleting rule 3 entirely would already be an improvement IMO.
The text was updated successfully, but these errors were encountered: