-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Re-resolve when lockfile is invalid #7020
Conversation
cd17755
to
e3d695f
Compare
Move the check for unmet dependencies in lockfile just in time to be able to re-resolve if unmet dependencies are found.
e3d695f
to
ffbad95
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.
This looks like a much better approach.
Thanks @martinemde! |
Tested this and it works great, I get a non-zero exit status code (6 for some reason, I don't think that's publicly documented), the error message is really good. Thank you! I don't see anything checking the return value explicitly in the spec though, the Also while looking into this, I found this, which sounds 6 shouldn't go all the way to the exit status of the command: rubygems/bundler/lib/bundler/errors.rb Lines 23 to 24 in 956ecb8
|
You're right, happy to take a PR to add that assertion. We have helpers for checking that no gems were installed, and also for checking that the last command returned a failed status. |
…alid Re-resolve when lockfile is invalid (cherry picked from commit 956ecb8)
…alid Re-resolve when lockfile is invalid (cherry picked from commit 956ecb8)
…alid Re-resolve when lockfile is invalid (cherry picked from commit 956ecb8)
…alid Re-resolve when lockfile is invalid (cherry picked from commit 956ecb8)
What was the end-user or developer problem that led to this PR?
Sometimes, even if we give a warning about it, we may end up installing gems incompatible with each other.
What is your fix for the problem, implemented in this PR?
My fix is to move the check for unmet dependencies in lockfile just in time to be able to re-resolve if unmet dependencies are found.
Still missing a spec.
Make sure the following tasks are checked