fix(go): filter out go pre-release versions in ls-remote#7488
Conversation
There was a problem hiding this comment.
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.
scop
left a comment
There was a problem hiding this comment.
LGTM, surface skimmed only, not tested
|
bugbot run |
|
This does not seem to have worked (That was with mise cache cleaned, FWIW) |
|
@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 |
|
Yeah, it's the version host. As noted my previous test was with local cache cleaned. |
|
the version updates still use an older |
This PR is a follow-up on the discussion #7486.
It seems the
gocore plugin uses a regex to filter out certainrcversions which stems from the early days. Its not clear from the code why only certain versions are filtered out. IMO allbetaandrcversions should be filtered out.Note
Simplifies and unifies version filtering for the Go plugin.
src/plugins/core/go.rs, replaces legacy regex exclusions with a generic filter that removes allbeta/rctags in both the slow (GitHub tags with dates) and fast (git ls-remote) code pathsWritten by Cursor Bugbot for commit a584220. This will update automatically on new commits. Configure here.