Skip to content

fix(go): filter out go pre-release versions in ls-remote#7488

Merged
jdx merged 2 commits into
jdx:mainfrom
roele:issues/go-prerelease-versions
Dec 30, 2025
Merged

fix(go): filter out go pre-release versions in ls-remote#7488
jdx merged 2 commits into
jdx:mainfrom
roele:issues/go-prerelease-versions

Conversation

@roele
Copy link
Copy Markdown
Contributor

@roele roele commented Dec 26, 2025

This PR is a follow-up on the discussion #7486.

It seems the go core plugin uses a regex to filter out certain rc versions which stems from the early days. Its not clear from the code why only certain versions are filtered out. IMO all beta and rc versions should be filtered out.


Note

Simplifies and unifies version filtering for the Go plugin.

  • In src/plugins/core/go.rs, replaces legacy regex exclusions with a generic filter that removes all beta/rc tags in both the slow (GitHub tags with dates) and fast (git ls-remote) code paths
  • Keeps de-duplication and sorting logic unchanged

Written by Cursor Bugbot for commit a584220. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings December 26, 2025 13:24
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 simplifies and improves the filtering of Go pre-release versions when listing available versions. The old regex had typos and only filtered specific early Go versions (1.0-1.2 series), while the new regex consistently filters all beta and rc versions across the entire version history.

  • Replaces complex, error-prone regex with a simpler pattern that matches versions ending with "beta" or "rc" followed by optional digits
  • Applies the same filtering logic to both the slow path (GitHub API with dates) and fast path (git ls-remote)

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

Copy link
Copy Markdown
Contributor

@scop scop left a comment

Choose a reason for hiding this comment

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

LGTM, surface skimmed only, not tested

@jdx
Copy link
Copy Markdown
Owner

jdx commented Dec 30, 2025

bugbot run

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no bugs!

@jdx jdx merged commit 7751ed1 into jdx:main Dec 30, 2025
35 checks passed
@roele roele deleted the issues/go-prerelease-versions branch December 31, 2025 07:45
@scop
Copy link
Copy Markdown
Contributor

scop commented Jan 2, 2026

This does not seem to have worked

$ mise version | tail -n 1
2025.12.13 linux-x64 (2025-12-30)
$ mise ls-remote go | tail -n 5
1.25.2
1.25.3
1.25.4
1.25.5
1.26rc1

(That was with mise cache cleaned, FWIW)

@roele
Copy link
Copy Markdown
Contributor Author

roele commented Jan 2, 2026

@scop Problem is most likely the local cache and the version host (as usual) which still returns the outdated list of versions.

The following works for me though

mise cache clear
MISE_USE_VERSIONS_HOST=false mise ls-remote go

@scop
Copy link
Copy Markdown
Contributor

scop commented Jan 2, 2026

Yeah, it's the version host. As noted my previous test was with local cache cleaned.

@roele
Copy link
Copy Markdown
Contributor Author

roele commented Jan 2, 2026

the version updates still use an older mise version, that's why the change is not yet reflected in the version host

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.

5 participants