-
Notifications
You must be signed in to change notification settings - Fork 873
bug: ASDF "latest:[...]" not working as it should #2073
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
Comments
@Venefic do you happen to know if this was an issue in older versions of asdf like |
Hi @Stratus3D afaik everything before adding "numericStartFilterRegex" works fine. I've removed this filter locally and rebuilt ASDF and it's working fine. |
The CI for Example build: https://github.com/asdf-community/asdf-nim/actions/runs/15121840813
Output of
|
Never mind, it's the actions that is broken. |
Uh oh!
There was an error while loading. Please reload this page.
Describe the Bug
Since ASDF version 0.16.5 every install command that is installing 'latest' version in certain conditions is not working. I've pinpointed the exact commit and thing that is doing so. Pull request fix: latest version returns latest version #1996 containing commit 46d3f42 does add an additional filtering by "numericStartFilterRegex"that is created in line 27 and used in line 264. This causes every software distribution not starting with a number to fail during 'latest' installation eg. java latest:temurin-8 or python latest:pypy3.9 but when you try 'python latest:3.13' it will work.
Below will be tests and results so a lot of pasting:
Testing installation when using version 0.16.7 with added prints before filters, after numeric filter and after latest filter:
root@665ce900120d:/new/asdf/cmd/asdf# asdf install java latest:temurin-8 All versions: [temurin-8.0.302+8 temurin-8.0.312+7 temurin-8.0.322+6 temurin-8.0.332+9 temurin-8.0.342+7 temurin-8.0.345+1 temurin-8.0.352+8 temurin-8.0.362+9 temurin-8.0.372+7 temurin-8.0.382+5 temurin-8.0.392+8 temurin-8.0.402+6 temurin-8.0.412+8 temurin-8.0.422+5 temurin-8.0.432+6 temurin-8.0.442+6 temurin-8.0.452+9] Filter after numeric: [] Filter after latest: [] error installing version: no latest version found
And then after changing line 262 in versions.go file to:
versions = filterOutByRegex(allVersions, latestFilterRegex, false)
I've got:
root@665ce900120d:/new/asdf/cmd/asdf# asdf install java latest:temurin-8 All versions: [temurin-8.0.302+8 temurin-8.0.312+7 temurin-8.0.322+6 temurin-8.0.332+9 temurin-8.0.342+7 temurin-8.0.345+1 temurin-8.0.352+8 temurin-8.0.362+9 temurin-8.0.372+7 temurin-8.0.382+5 temurin-8.0.392+8 temurin-8.0.402+6 temurin-8.0.412+8 temurin-8.0.422+5 temurin-8.0.432+6 temurin-8.0.442+6 temurin-8.0.452+9] Filter after numeric: [] Filter after latest: [temurin-8.0.302+8 temurin-8.0.312+7 temurin-8.0.322+6 temurin-8.0.332+9 temurin-8.0.342+7 temurin-8.0.345+1 temurin-8.0.352+8 temurin-8.0.362+9 temurin-8.0.372+7 temurin-8.0.382+5 temurin-8.0.392+8 temurin-8.0.402+6 temurin-8.0.412+8 temurin-8.0.422+5 temurin-8.0.432+6 temurin-8.0.442+6 temurin-8.0.452+9]
And it started to install correct version (temurin-8.0.452+9)
I would propose to remove the filtering that removes everything not starting with a number as this should be filtered on the side of plugin, and since this was merged not sure how many different plugins are affected.
Steps to Reproduce
Expected Behaviour
ASDF grabs latest temurin-8 version (temurin-8.0.452+9), downloads and installs it.
Actual Behaviour
You will get an error like:
root@17b4adcee23c:~# asdf install java latest:temurin-8 error installing version: no latest version found
Environment
asdf plugins affected (if relevant)
python, java
The text was updated successfully, but these errors were encountered: