-
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
source-hash should display hash of installed version #3567
Comments
FYI: from what I can see The documentation for |
I got bitten by this problem once again. This is a source of frustration at least once a month I would say. |
ftr per the new bountysource terms the bounty will expire on Dec 20 2020 and bountysource will retain the money (ref https://help.nextcloud.com/t/dont-use-bountysource-anymore/84943 ), so if somebody wants to work on this soon that would be nice |
I had a look into this. It's not completely clear to me how this should be implemented. This chunk of code opam/src/client/opamListCommand.ml Line 561 in b651400
opam list is called. The correct repository doesn't seem to exist in ~/.opam .
On the other hand the fields in https://github.com/ocaml/opam/blob/master/src/client/opamListCommand.ml#L742 are extracted from the correct opam file for that version of the package. So I was considering a change that would use an x-source-hash field, storing the source hash into the opam file when it's added and updated rather than when opam list is called. I couldn't work out where in the code this operation would go and I am not sure if adding data to opam files is desirable. Any input on a correct strategy for fixing this issue? |
There is several ways to integrate that :
|
When a package is installed from a VCS like git, a
source-hash
field is displayed byopam show PKG
. This hash is the hash of the last commit cloned by opam. It is not the hash of the commit used to install the package. This is miss-leading. Pretty often I runopam update
without upgrading. After that it is complicated to know what version of the package is actually installed. I think it would be better to displayed the installed version.Here is a simple scenario showing the confusing case:
The text was updated successfully, but these errors were encountered: