feat: support asdf formated version strings#17
Merged
aooohan merged 4 commits intoversion-fox:mainfrom Sep 29, 2025
Merged
Conversation
Contributor
tisoft
commented
May 23, 2024
- allow short and long names for distributions
- allow the distribution to prefix or suffix the version
* allow short and long names for distributions * allow the distribution to prefix or suffix the version
Contributor
Author
|
See discussion in https://github.com/version-fox/vfox/discussions/287 |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors version string parsing to support asdf-formatted version strings with distribution names in both prefix and suffix positions. The changes modernize the architecture by consolidating short/long name mappings and introducing flexible version parsing logic.
- Moves short name mappings from a separate module into a comprehensive distribution version parser
- Adds support for parsing version strings with distributions as either prefixes or suffixes (e.g., "temurin-11" or "11-temurin")
- Introduces bidirectional mapping between short names and full distribution names
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/shortname.lua | Removed - functionality moved to distribution_version.lua |
| lib/distribution_version.lua | New module providing comprehensive version string parsing with flexible distribution positioning |
| hooks/pre_use.lua | New hook for pre-processing user input versions |
| hooks/pre_install.lua | Updated to use new distribution version parser |
| hooks/parse_legacy_file.lua | Migrated from shortname module to distribution version parser |
| hooks/available.lua | Updated to use new distribution parsing logic |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.