asdf-vm / asdf-vm/asdf-ruby

Auto-reshim is broken when using the asdf-alias plugin

Open
#399 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
734
Forks
156
Avg merge
17h 6m
Merged PRs (30d)
1

Description

I found an interesting asdf edge case I'm not sure how to solve. It's related to the asdf-alias plugin and the auto-reshimming feature of some language plugins like Ruby.

The problem: [this hook](https://github.com/asdf-vm/asdf-ruby/blob/master/rubygems-plugin/rubygems_plugin.rb) uses the Ruby constant `RUBY_VERSION`, and when the active Ruby version is an alias version (which is a symlink to a concrete version), this results in an incorrect reshim command. For example, when the active version is `3.2`, the executed command is `asdf reshim 3.2.0` instead of `asdf reshim 3.2`.

Does anyone have a clever idea to work around this from the asdf-ruby side? One option would be to relax the reshim command to reshim all known Ruby versions, but that would be bad for performance.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.