Skip to content

fix(static_helpers): allow full github tag#7463

Closed
yordis wants to merge 1 commit into
jdx:mainfrom
yordis:fix-versioning-github
Closed

fix(static_helpers): allow full github tag#7463
yordis wants to merge 1 commit into
jdx:mainfrom
yordis:fix-versioning-github

Conversation

@yordis
Copy link
Copy Markdown
Contributor

@yordis yordis commented Dec 20, 2025

Signed-off-by: Yordis Prieto yordis.prieto@gmail.com

Context

When installing tools from GitHub repositories that use monorepo-style version tags (e.g., protoc-gen-elixir-grpc@v0.4.0), mise incorrectly prepended a v prefix, resulting in the wrong tag being requested:
ml

[tools]
"github:TrogonStack/protoc-gen" = "protoc-gen-elixir-grpc@v0.4.0"

Before the fix:

  • mise tried: vprotoc-gen-elixir-grpc@v0.4.0 ❌ (404 Not Found)
  • Should try: protoc-gen-elixir-grpc@v0.4.0

@yordis yordis marked this pull request as ready for review December 20, 2025 07:51
Copilot AI review requested due to automatic review settings December 20, 2025 07:51
@yordis yordis force-pushed the fix-versioning-github branch 2 times, most recently from 3cdc42a to d1c2d5d Compare December 20, 2025 07:53
Copy link
Copy Markdown
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 fixes a bug where mise incorrectly prepended a 'v' prefix to monorepo-style GitHub version tags containing '@' symbols (e.g., protoc-gen-elixir-grpc@v0.4.0), causing 404 errors when trying to fetch releases.

Key Changes:

  • Added detection for full release tags containing @v or @[digit] patterns to prevent automatic 'v' prefix addition
  • Modified version resolution logic to try full tags as-is without modification
  • Enhanced error messages to clarify when tags are used without modification

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/backend/static_helpers.rs Introduced FULL_TAG_PATTERN regex and looks_like_full_tag() function to detect complete release tags; updated try_with_v_prefix() to handle full tags without adding 'v' prefix; added comprehensive unit tests
e2e/backend/test_github_monorepo_version_tags Added end-to-end test verifying correct behavior with monorepo-style version tags from the bug report scenario

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/backend/static_helpers.rs Outdated
Comment thread e2e/backend/test_github_monorepo_version_tags Outdated
@yordis yordis force-pushed the fix-versioning-github branch 2 times, most recently from 05d6c76 to 37091f4 Compare December 20, 2025 08:17
@yordis
Copy link
Copy Markdown
Contributor Author

yordis commented Dec 20, 2025

@jdx what is the reason to care about the tag syntax at all when using GitHub?

@yordis yordis force-pushed the fix-versioning-github branch from 2bbaa79 to e6415a7 Compare December 20, 2025 08:21
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis yordis force-pushed the fix-versioning-github branch from e6415a7 to 87974e0 Compare December 31, 2025 04:46
@yordis
Copy link
Copy Markdown
Contributor Author

yordis commented Dec 31, 2025

@jdx this one is passing now, could you give me a hand here. I added the unit test to showcase the situation.
Although, I am not sure how we suppose to manage multiple tools from the same GitHub with different releases

Comment on lines +18 to +19
/// Regex pattern for detecting full release tags (e.g., "name@v1.0.0", "tool@2.0.0", "tool@beta")
/// Matches @ followed by any non-whitespace characters, indicating a scoped/tagged version
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am just making this to work for myself, I wonder if there is a better way, honestly, I feel mise shouldn't make assumption around the tagging (such as enforcing the v* or SemVer neither)

@yordis
Copy link
Copy Markdown
Contributor Author

yordis commented Jan 2, 2026

@jdx is this related to #7391 Should I simply focus on doing as #7391 did?

} else if looks_like_full_tag(version) {
// Version already contains version-like patterns (e.g., "name@v1.0.0")
// Don't add v prefix - the tag is already complete as specified
vec![version.to_string()]
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I don't understand this PR, it is checking both variants without this change so it should work.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jdx it used to fail, but then you added #7391 so I guess I should close this for now

@yordis
Copy link
Copy Markdown
Contributor Author

yordis commented Jan 7, 2026

Close this, #7391 has been merged with provides the proper way to do this now

@yordis yordis closed this Jan 7, 2026
@yordis yordis deleted the fix-versioning-github branch January 7, 2026 19:07
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.

3 participants