-
Notifications
You must be signed in to change notification settings - Fork 165
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
Open
vinistock
wants to merge
1
commit into
main
Choose a base branch
from
11-06-fallback_to_latest_known_ruby_if_no_.ruby-version_is_found
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fallback to latest known Ruby if no .ruby-version is found #2836
vinistock
wants to merge
1
commit into
main
from
11-06-fallback_to_latest_known_ruby_if_no_.ruby-version_is_found
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
2 times, most recently
from
November 20, 2024 19:56
26f5cd8
to
eecb394
Compare
vinistock
force-pushed
the
11-06-fallback_to_latest_known_ruby_if_no_.ruby-version_is_found
branch
from
November 20, 2024 19:57
eecb394
to
21ecd46
Compare
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!