Skip to content
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

Extract Ruby fallback cancellable flow #2911

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

vinistock
Copy link
Member

@vinistock vinistock commented Nov 26, 2024

Motivation

This PR makes the cancellable logic used in Chruby activation reusable, so that we can use it for two purposes

  1. The fallback for when no .ruby-version is found (already in place)
  2. The fallback for when the version specified in .ruby-version is not installed

The cancellable flow does a lot of little things, like waiting a few seconds, allowing the user to cancel and then define fallbacks for the system or for the Ruby LSP and implementing it twice would result in a lot of duplication.

Implementation

This PR just extracts the cancellable flow into a function we can customize.

Copy link
Member Author

vinistock commented Nov 26, 2024

@vinistock vinistock added the vscode This pull request should be included in the VS Code extension's release notes label Nov 26, 2024 — with Graphite App
@vinistock vinistock added the other Changes that aren't bugfixes, enhancements or breaking changes label Nov 26, 2024 — with Graphite App
@vinistock vinistock marked this pull request as ready for review November 26, 2024 14:28
@vinistock vinistock requested a review from a team as a code owner November 26, 2024 14:28
vscode/src/ruby/chruby.ts Outdated Show resolved Hide resolved
@vinistock vinistock force-pushed the 11-22-extract_ruby_fallback_cancellable_flow branch from 96fc38f to db1e70c Compare November 26, 2024 15:48
@vinistock vinistock merged commit 23d8048 into main Nov 26, 2024
35 checks passed
Copy link
Member Author

Merge activity

  • Nov 26, 11:14 AM EST: A user merged this pull request with Graphite.

@vinistock vinistock deleted the 11-22-extract_ruby_fallback_cancellable_flow branch November 26, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants