-
Notifications
You must be signed in to change notification settings - Fork 166
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 latest known Ruby if no .ruby-version is found #2836
Merged
vinistock
merged 1 commit into
main
from
11-06-fallback_to_latest_known_ruby_if_no_.ruby-version_is_found
Nov 22, 2024
Merged
Fallback to latest known Ruby if no .ruby-version is found #2836
vinistock
merged 1 commit into
main
from
11-06-fallback_to_latest_known_ruby_if_no_.ruby-version_is_found
Nov 22, 2024
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 6, 2024
— with
Graphite App
vinistock
force-pushed
the
11-06-allow_individual_version_managers_to_trigger_manual_ruby_selection
branch
from
November 6, 2024 19:04
b9e537c
to
ba965f8
Compare
vinistock
force-pushed
the
11-06-fallback_to_latest_known_ruby_if_no_.ruby-version_is_found
branch
from
November 6, 2024 19:04
ea45f37
to
4bf4561
Compare
vinistock
force-pushed
the
11-06-allow_individual_version_managers_to_trigger_manual_ruby_selection
branch
from
November 19, 2024 18:18
ba965f8
to
04bc155
Compare
vinistock
force-pushed
the
11-06-fallback_to_latest_known_ruby_if_no_.ruby-version_is_found
branch
from
November 19, 2024 18:18
4bf4561
to
9a4bd56
Compare
vinistock
force-pushed
the
11-06-allow_individual_version_managers_to_trigger_manual_ruby_selection
branch
from
November 19, 2024 18:34
04bc155
to
e0025a6
Compare
vinistock
force-pushed
the
11-06-fallback_to_latest_known_ruby_if_no_.ruby-version_is_found
branch
from
November 19, 2024 18:34
9a4bd56
to
b035193
Compare
andyw8
reviewed
Nov 20, 2024
vinistock
changed the base branch from
11-06-allow_individual_version_managers_to_trigger_manual_ruby_selection
to
graphite-base/2836
November 20, 2024 18:33
vinistock
force-pushed
the
11-06-fallback_to_latest_known_ruby_if_no_.ruby-version_is_found
branch
from
November 20, 2024 18:33
b035193
to
edf4f00
Compare
vinistock
force-pushed
the
graphite-base/2836
branch
from
November 20, 2024 18:33
e0025a6
to
afe3705
Compare
As discussed:
|
vinistock
force-pushed
the
11-06-fallback_to_latest_known_ruby_if_no_.ruby-version_is_found
branch
3 times, most recently
from
November 20, 2024 19:57
eecb394
to
21ecd46
Compare
I addressed all of the feedback. Ready for another round of reviews. |
st0012
reviewed
Nov 22, 2024
vinistock
force-pushed
the
11-06-fallback_to_latest_known_ruby_if_no_.ruby-version_is_found
branch
from
November 22, 2024 18:36
21ecd46
to
f8abd81
Compare
st0012
approved these changes
Nov 22, 2024
vinistock
force-pushed
the
11-06-fallback_to_latest_known_ruby_if_no_.ruby-version_is_found
branch
from
November 22, 2024 18:46
f8abd81
to
25612c3
Compare
st0012
approved these changes
Nov 22, 2024
Merge activity
|
vinistock
deleted the
11-06-fallback_to_latest_known_ruby_if_no_.ruby-version_is_found
branch
November 22, 2024 19:12
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.
Motivation
Completes a significant part of handling missing
.ruby-version
for #2793If the user doesn't have a
.ruby-version
in their project or in any parent directories, then we can try to fallback to the latest known Ruby available.Note: this PR doesn't handle the aspect of having a
.ruby-version
configured to a Ruby that's not installed. I'll follow up with that later.Implementation
To avoid having this behaviour be surprising, I used a progress notification with a 5 second delay warning the user that we are going to try falling back to the latest known Ruby. If they don't do anything, we search for the Ruby installation and launch.
If the user clicks cancel, then we stop everything and offer them 3 options:
.ruby-version
file in a parent directory. Here we use a quick pick to list all known rubies and create the file for them using what they selectAutomated Tests
Added automated tests for two scenarios. I haven't figured out if it's possible to trigger the cancellation in a test even with a stub, so I failed to create tests for those cases.
If you have an idea about how to fake the cancellation of the progress notification, please let me know!