-
Notifications
You must be signed in to change notification settings - Fork 358
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
On version pinning don't read archive opam file #4931
base: master
Are you sure you want to change the base?
Conversation
OpamFile.OPAM.safe_read >>= | ||
OpamFile.OPAM.version_opt) | ||
= Some nv.version | ||
(OpamSwitchState.is_version_pinned st (OpamPackage.name nv) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this also return true
when doing opam pin add pkg.version <repo>
? In that case, there is no need to look into the archive/repo either
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not sure what the entire if statement is trying to do in the first place.
"do not do anything (equivalent to --no-action
) if e.g. doing something like opam pin add pkg.version <archive/repo>
and the version number is the same as the one in the archive/repo" ? That seems a bit suspicious to me
I had a go at trying to debug this suspicious
So I really think this whole |
…the opam file in the <repo> is the same as <version>
It is not suspicious, that We need to check We also need to add some pinning and downloading/syncing tests, to check and be sure that we don't sync more that we need.
From where is this citation? Maybe we need to clarify that doc. |
fix #4608