Repository navigation
Make bundle update --bundler actually lock to the latest bundler version (even if not yet installed) - #5182
Merged
Conversation
deivid-rodriguez
force-pushed
the
bundle-update-bundler
branch
from
December 20, 2021 02:33
89513e6 to
649a369
Compare
This was referenced Dec 26, 2021
deivid-rodriguez
force-pushed
the
bundle-update-bundler
branch
from
December 27, 2021 20:07
649a369 to
c98ec14
Compare
deivid-rodriguez
force-pushed
the
bundle-update-bundler
branch
from
December 29, 2021 19:51
c98ec14 to
42110de
Compare
Contributor
Author
|
This is green now! I'll add some specs tomorrow. |
We now have autoswitching, I don't think this logic is needed.
I prefer to not use mocking and check the lockfile directly.
deivid-rodriguez
force-pushed
the
bundle-update-bundler
branch
4 times, most recently
from
January 7, 2022 20:29
17d9545 to
aaf60aa
Compare
Contributor
Author
|
Alright, I fixed a bunch of bugs and added specs. If CI agrees, this one should be ready! |
deivid-rodriguez
marked this pull request as ready for review
January 7, 2022 20:34
deivid-rodriguez
commented
Jan 7, 2022
deivid-rodriguez
force-pushed
the
bundle-update-bundler
branch
5 times, most recently
from
January 8, 2022 11:45
595d022 to
884b8ab
Compare
And make it a `Gem::Version` for consistency.
We did this conservatively when installing the locked version on `bundle install` (and we may also stop doing it), but in the case of `bundle update --bundler`, updating bundler is the whole point so it makes no sense to ignore any errors.
deivid-rodriguez
force-pushed
the
bundle-update-bundler
branch
from
January 8, 2022 13:19
884b8ab to
3780ccd
Compare
Contributor
Author
|
It was more painful than I expected, but it's all green now! |
deivid-rodriguez
added a commit
that referenced
this pull request
Jan 12, 2022
Make `bundle update --bundler` actually lock to the latest bundler version (even if not yet installed) (cherry picked from commit 474a5e8)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was the end-user or developer problem that led to this PR?
The problem is that upgrading your application to use the latest Bundler is not easy. You have to first run
gem install bundler, and then runbundle update --bundler. Running the latter should upgrade Bundler without having to run the former.What is your fix for the problem, implemented in this PR?
Fix is to implement this feature but checking available versions remotely and installing the latest available. That unless a specific version is specified as a target (
bundle update --bundler <version>), in which case, we first check whether that version is already installed locally and switch to it in that case, or directly install it and switch otherwise.Fixes #3343.
Fixes #5172.
Make sure the following tasks are checked