-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix bundle lock --update <gem> with --lockfile flag updating all gems
#8922
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 bundle lock --update <gem> with --lockfile flag updating all gems
#8922
Conversation
c96f34c to
18ac3ce
Compare
|
Thank you! I understand that this would be the only way to gracefully transition back to passing a How about keeping the current deprecation (which should be consolidated in Bundler 4), and instead expose |
|
Yeah I agree that the extra complexity just to get us to where we were is off putting. |
|
I think we never supported |
18ac3ce to
ad0fdef
Compare
|
👍 , nevermind I got confused. I made the change and exposed the |
deivid-rodriguez
left a comment
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.
Makes sense to me, thanks for the fix!
- Ref ruby#8917 - ### Problem Prior to Bundler 2.5.6, running `bundle lock --update foo --lockfile Gemfile_bumped.lock` would update only the foo gem and write the lockfile to the `Gemfile_bumped.lock`. In Bundler 2.5.6 and above running the same command, updates absolutely all gems. This change is related to ruby#7047 ### Solution We decided to expose the `write_lock` method rather than going through a complex deprecation cycle of the `lock` method. This commit applies the same business logic as prios to 2.5.6 where, we build the definition using the existing lockfile, make changes to the definition and dump it into the desired lockfile.
ad0fdef to
c88f00c
Compare
|
Thanks David! |
Definition#lock. Also fix bundle lock updating all gems.bundle lock --update <gem> with --lockfile flag updating all gems
Reintroduce the possibility to pass a path on `Definition#lock`. Also fix `bundle lock` updating all gems. (cherry picked from commit c230844)
Reintroduce the possibility to pass a path on `Definition#lock`. Also fix `bundle lock` updating all gems. (cherry picked from commit c230844)
What was the end-user or developer problem that led to this PR?
See #8917
What is your fix for the problem, implemented in this PR?
First commit removes the deprecation on
Definition#lockwhere we planned to remove the possibility to pass a path.Second commit makes use of the first commit and fix the
bundle lockcommand when passed both the--lockfileand--updategem. The lock command now build a definition from an existing lockfile, make the requested changes to the definition and dump its content into the desired lockfile.Make sure the following tasks are checked