Skip to content

Conversation

@tisoft
Copy link
Contributor

@tisoft 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
@tisoft
Copy link
Contributor Author

tisoft commented May 23, 2024

See discussion in https://github.com/version-fox/vfox/discussions/287

@aooohan aooohan requested a review from Copilot September 29, 2025 12:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@aooohan aooohan merged commit 9e650fb into version-fox:main Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants