asdf-vm / asdf-vm/asdf

Use best-matching version

Open
#352 43 comments 98 reactions 0 assignees View on GitHub
proposal
Dominant language
Go
Stars
25.6k
Forks
941
Avg merge
9h 24m
Merged PRs (30d)
3

Description

### Steps to reproduce

```
$ asdf list ruby
> 2.3.1
2.3.7
$ asdf local ruby 2.3
```

### Expected behavior

Use version 2.3.7, since it is the highest version that matches the given value.

### Actual behavior

`version 2.3 is not installed for ruby`

### Environment

**OS**: macOS 10.13.6

**asdf version**: 0.5.1

Similar to #226, I'd love to be able to be less specific about versions and get the highest matching installed version. For something like postgres, I might just say `9` or `10`, for ruby, I might use major and minor. I think this would make the tool a lot more useable.

If this sounds good, I could probably put together a PR, although I'm not sure how much overlap there will be in the logic for installing a highest-matching version.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the behavior with `asdf list ruby` and `asdf local ruby 2.3`, then trace the CLI path that resolves a requested version. Compare that resolution with the installed versions and verify that partial requests select the highest matching version while exact requests retain their current behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.