-
Notifications
You must be signed in to change notification settings - Fork 172
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
Fallback to closest Ruby if we can't find an installation for the requested version #2912
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 stack of pull requests is managed by Graphite. Learn more about stacking. |
vinistock
added
other
Changes that aren't bugfixes, enhancements or breaking changes
vscode
This pull request should be included in the VS Code extension's release notes
labels
Nov 26, 2024
— with
Graphite App
vinistock
removed
the
other
Changes that aren't bugfixes, enhancements or breaking changes
label
Nov 26, 2024
vinistock
force-pushed
the
11-22-extract_ruby_fallback_cancellable_flow
branch
from
November 26, 2024 15:48
96fc38f
to
db1e70c
Compare
vinistock
force-pushed
the
11-22-add_fallback_for_missing_rubies
branch
from
November 26, 2024 15:48
be531b5
to
b8aff77
Compare
vinistock
changed the base branch from
11-22-extract_ruby_fallback_cancellable_flow
to
graphite-base/2912
November 26, 2024 16:14
vinistock
force-pushed
the
graphite-base/2912
branch
from
November 26, 2024 16:14
db1e70c
to
23d8048
Compare
vinistock
force-pushed
the
11-22-add_fallback_for_missing_rubies
branch
from
November 26, 2024 16:14
b8aff77
to
e7e02be
Compare
vinistock
force-pushed
the
11-22-add_fallback_for_missing_rubies
branch
from
November 26, 2024 16:15
e7e02be
to
87185b2
Compare
andyw8
reviewed
Nov 28, 2024
vinistock
force-pushed
the
11-22-add_fallback_for_missing_rubies
branch
from
November 28, 2024 16:08
87185b2
to
933a9b5
Compare
andyw8
approved these changes
Nov 29, 2024
vinistock
force-pushed
the
11-22-add_fallback_for_missing_rubies
branch
from
November 29, 2024 15:14
933a9b5
to
b76c60b
Compare
Merge activity
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
vscode
This pull request should be included in the VS Code extension's release notes
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.
Motivation
Closes #2793
This PR starts adds a fallback for when the specified Ruby in
.ruby-version
is not found/not installed.The UX is similar to the fallback for missing
.ruby-version
configurations. We show a temporary progress warning the user we're going to fallback and give the chance of cancelling, which allows them to manually configure the right version.Implementation
The implementation is very similar to the fallback for missing
.ruby-version
. The main distinction is that, when we know the version specified, we can try to fallback to the closest one available.There are a few decisions I baked into the implementation:
.ruby-version
file specifies Ruby 4.0.0, we would not try to fallback to 3.0.0. I think this is a fair limitation and since Ruby is so conservative about major versions, it shouldn't be too painful3.3.5
and we have3.1.0
and3.2.2
installed, we want to pick3.2.2
because that's closest to3.3.5
. And as another example, if both3.2.0
and3.2.2
are installed, we would pick3.2.2
because that's the highest patchAutomated Tests
Added tests.