Uh oh!
There was an error while loading. Please reload this page.
Refactor VersionManager detection logic - #3894
Conversation
b480efc to
6e48de7Compare15de79c to
9d4ef87CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| // Learn more: https://github.com/spinel-coop/rv | ||
| export class Rv extends VersionManager { | ||
| private static getPossiblePaths(): vscode.Uri[] { | ||
| export class Rv extends Mise { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I agree, but we have this same pattern with the Chruby and RubyInstaller, so I just simplified the hierarch chain of this one
vinistock
commented
Jan 22, 2026
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. |
06d1872 to
528f4a0Compare
How to use the Graphite Merge QueueAdd 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. |
528f4a0 to
f2567f4Compare…ss as a static method
f2567f4 to
e1bf26bCompare845a130 to
2f15b0bCompareThis situation can only happen if discoverVersionManager() fails to detect any version manager and leaves identifier as 'auto', which should never happen since `None` is the fallback. This is just an additional safety check to catch bugs early.
e1bf26b to
4485199Compare
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
switchstatement full of duplicated logic.