Skip to content

Conversation

@rafaelfranca
Copy link
Member

Motivation

Looking at #3878 I noticed that adding a new version manager was requiring a lot of duplication of logic. While working on removing that I also noticed that even the existing manager were duplicating logic, so I took the opportunity to refactor all the managers.

Implementation

I moved the logic to detect the version manager to their classes. I also used a hash lookup instead of the exisint switch statement full of duplicated logic.

@rafaelfranca rafaelfranca requested a review from a team as a code owner January 8, 2026 03:53
@rafaelfranca rafaelfranca force-pushed the rm-refactor-version-manager branch from b480efc to 6e48de7 Compare January 8, 2026 03:55
@rafaelfranca rafaelfranca added chore Chore task vscode This pull request should be included in the VS Code extension's release notes labels Jan 8, 2026
@rafaelfranca rafaelfranca force-pushed the rm-refactor-version-manager branch from 15de79c to 9d4ef87 Compare January 12, 2026 21:44
// Learn more: https://github.com/spinel-coop/rv
export class Rv extends VersionManager {
private static getPossiblePaths(): vscode.Uri[] {
export class Rv extends Mise {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one I find a bit weird. I would instead extract another common parent rather than having two different version managers inherit from each other.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but we have this same pattern with the Chruby and RubyInstaller, so I just simplified the hierarch chain of this one

@vinistock
Copy link
Member

Since this is a considerable refactor, we should cut a preview release of the extension once we converge on the implementation to catch any issues before the stable release.

@rafaelfranca rafaelfranca changed the base branch from main to graphite-base/3894 January 22, 2026 21:15
@rafaelfranca rafaelfranca force-pushed the rm-refactor-version-manager branch from 06d1872 to 528f4a0 Compare January 22, 2026 21:15
@rafaelfranca rafaelfranca changed the base branch from graphite-base/3894 to rmf-vscode-shell January 22, 2026 21:15
Copy link
Member Author

rafaelfranca commented Jan 22, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label graphite-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Chore task 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.

3 participants