-
-
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
Fix regression related to locked ruby #3900
Merged
Merged
Conversation
This file contains 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
This reverts commit 68929fc. This change caused a regression if applications are using the `ruby` Gemfile DSL, have a locked ruby version different from the running ruby, and run `bundle update`. In that case, the new result is something like: ``` Could not find gem 'Ruby (>= 2.2.2, = 2.7.1.83, = 2.6.5.114)' in the local ruby installation. The source contains 'Ruby' at: 2.7.1.83 ``` whereas before things would just work. The reason is that the reverted commit started adding both the locked ruby and the running running as exact ruby requirements when unlocking. And they will obviously conflict if they are different. This PR reverts the commit and adds a regression spec to catch the error.
The unused code is a leftover from commit 38b0e7e . That commit disabled that RubyVersion.system is respected, but it seems that that feature wasn't missed.
indirect
approved these changes
Aug 24, 2020
Thanks @indirect! |
deivid-rodriguez
added a commit
that referenced
this pull request
Oct 5, 2020
Fix regression related to locked ruby (cherry picked from commit 03738b8)
deivid-rodriguez
added a commit
that referenced
this pull request
Oct 5, 2020
Fix regression related to locked ruby (cherry picked from commit 03738b8)
deivid-rodriguez
added a commit
that referenced
this pull request
Oct 5, 2020
Fix regression related to locked ruby (cherry picked from commit 03738b8)
deivid-rodriguez
added a commit
that referenced
this pull request
Oct 6, 2020
Fix regression related to locked ruby (cherry picked from commit 03738b8)
deivid-rodriguez
added a commit
that referenced
this pull request
Oct 6, 2020
Fix regression related to locked ruby (cherry picked from commit 03738b8)
deivid-rodriguez
added a commit
that referenced
this pull request
Oct 6, 2020
Fix regression related to locked ruby (cherry picked from commit 03738b8)
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?
A few months ago we introduced a change in how we handle the locked ruby version that has caused a (fortunately still unreleased) regression.
The regression will be hit be applications:
ruby
DSL.bundle update
.In that case, whereas previously things would just work, we now get an error like the following:
What is your fix for the problem, implemented in this PR?
This PR reverts the offending PR, and adds a regression spec.
The offending PR (that tried to reactivate this unsued code, but caused this regression), also linked to an alternative PR removing the unused code instead. As a bonus, this PR backports that alternative solution to the new repository.
Tasks:
I will abide by the code of conduct.