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
fix: support latest with filter on local and global #633
Conversation
CI failed and branch conflicts. I like this feature. |
Hi @klane, could you please rebase with master ? :) |
While it may not have been this weekend, I rebased with master and fixed the merge conflicts. It took me far longer than I care to admit to notice that a variable was renamed. I'm not sure why the Unix tests would pass on Ubuntu and fail on macOS, particularly since they pass locally on my Mac. Any suggestions are welcomed. |
- Filter installed versions with asdf list - Use the latest installed version of a tool
- Filter installed versions with asdf list - Use the latest installed version of a tool
Fixes failing CI tests on macOS Co-authored-by: Thomas B Homburg <thomas@homburg.dk>
Meanwhile I am using: Would be useful to support .tool-versions with content such as:
|
@lkraider We only want exact versions in I will work on re-basing this unless someone beats me to it. |
I found this because I've had a comment in my This is even more true given the large number of other tools supported by asdf today. In particular, tools like |
Yes, I think this has become the case. While we won't stop people from creating plugins for whichever tools they like, |
|
||
if ! (check_if_version_exists "$plugin_name" "$version"); then | ||
version_not_installed_text "$plugin_name" "$version" 1>&2 | ||
exit 1 | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this check_if_version_exists
handles the ref:<ref>
& path:<dir>
filters two calls deeper in the stack. Those I feel should be elevated to this level as latest:<filter>
is handled here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not suggestion we do this now, but this codebase is becoming spaghetti as everything gets pushed down into utils.bash
Summary
This PR extends the feature added in #575 to
asdf global
andasdf local
. Users can now specify the global or local version of a tool as the latest installed version.It also adds the ability to filter installed versions with
asdf list
:# only list installed versions of Python 3.7 asdf list python 3.7