-
Notifications
You must be signed in to change notification settings - Fork 362
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
Fix the install cache storing the wrong version of the opam file after a build failure #6213
Fix the install cache storing the wrong version of the opam file after a build failure #6213
Conversation
src/client/opamSolution.ml
Outdated
List.exists (function | ||
| `Fetch ps -> List.for_all (OpamPackage.equal nv) ps | ||
| `Build p | ||
| `Change (_, _, p) | ||
| `Install p | ||
| `Reinstall p | ||
| `Remove p -> OpamPackage.equal nv p) |
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.
The failure is specific to build and fetch errors, maybe adding a comment have that information. It's permit to explain why we need to have that check on install cache update.
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 don't really think this part of the code needs a comment but i do agree that the section (filtering as a whole) needed one so i added one. What do you think?
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.
👍
ffa19eb
to
9b891a7
Compare
39e587f
to
28fe994
Compare
…on failure It highlights a package mistakenly marked as to be reinstalled Co-authored-by: Raja Boujbel <raja.boujbel@ocamlpro.com>
…r a build or fetch failure
28fe994
to
232b15d
Compare
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.
lgtm! If my test part is ok, good to merge.
Upgrades from 2.2 to 2.3 can trigger issues where a repository forgot to add the missing extra-files field.
opam tells the user they should upgrade as the opam file changed (as extra-files was added automatically), then the build fails and upon fixing the error, opam still says the package is to be rebuilt because the previous version of the opam file was stored in the install cache.
This should be backported to the 2.3 branch as it can easily be triggered during the upgrade from 2.2 to 2.3.
Backported to 2.3 via #6214
Potentially related to #5922