fix: change version resolution order to restore legacy file fallback behavior #1956
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixed the issue where the order of processing during version resolution was reversed between v0.15 and v0.16.
In v0.15, the lookup was performed in the order of
.tool-versions → legacy file
.asdf/lib/utils.bash
Lines 166 to 182 in 31e8c93
In v0.16, the lookup order was changed to
legacy file → .tool-versions
.asdf/internal/resolve/resolve.go
Lines 59 to 79 in 0146164
The documentation states that setting
legacy_version_file = yes
enables the behavior: "Use plugin fallback to legacy version files if available."To ensure fallback works as expected, the lookup order needs to be reverted to the v0.15 behavior.
https://asdf-vm.com/manage/configuration.html#legacy-version-file
Other Information