fix(go): restore git ls-remote for version listing#7324
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores the use of git ls-remote --tags for listing Go versions, replacing the recently introduced github::list_tags() approach. The change addresses a critical bug where Go version listing returned no results because the golang/go repository contains 500+ tags, and the relevant "go1.x" version tags appear on later pages of GitHub API results (which are returned in alphabetical order, not chronological).
Key changes:
- Replaced
github::list_tags()withgit ls-remote --tagsto fetch all Go version tags efficiently in a single server-side filtered call - Wrapped the git operation in
run_fetch_task_with_timeout()to handle the remote call properly
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The golang/go repo has 500+ tags, and the "go1.x" version tags aren't on the first page of GitHub API results. The API returns older tags (like "weekly.*") first, so `github::list_tags` was returning no matching versions. Restore the original `git ls-remote --tags` approach which fetches all tags efficiently in a single call, filtered server-side to only "go*" tags. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
80f8363 to
b573a79
Compare
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.8 x -- echo |
20.4 ± 0.4 | 19.7 | 23.1 | 1.00 |
mise x -- echo |
21.1 ± 0.3 | 20.3 | 22.4 | 1.04 ± 0.02 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.8 env |
20.0 ± 0.4 | 19.3 | 23.9 | 1.00 |
mise env |
20.5 ± 0.6 | 19.5 | 29.2 | 1.02 ± 0.04 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.8 hook-env |
19.9 ± 0.5 | 18.7 | 22.4 | 1.00 |
mise hook-env |
20.5 ± 0.6 | 18.9 | 24.3 | 1.03 ± 0.04 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.8 ls |
17.6 ± 0.4 | 16.5 | 19.0 | 1.00 |
mise ls |
18.2 ± 0.3 | 17.3 | 19.3 | 1.04 ± 0.03 |
xtasks/test/perf
| Command | mise-2025.12.8 | mise | Variance |
|---|---|---|---|
| install (cached) | 113ms | 112ms | +0% |
| ls (cached) | 67ms | 68ms | -1% |
| bin-paths (cached) | 75ms | 74ms | +1% |
| task-ls (cached) | 282ms | 285ms | -1% |
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.
Summary
git ls-remote --tagsfor Go version listing instead ofgithub::list_tagsBackground
The recent change in #7305 switched Go from
git ls-remotetogithub::list_tags(). However, this broke Go version listing because:github::list_tags()only fetches the first page by default (whenMISE_LIST_ALL_VERSIONSis not set)The original
git ls-remote --tagsapproach fetches all tags efficiently in a single call, filtered server-side to only "go*" tags.Test plan
mise run lint-fixpassesMISE_USE_VERSIONS_HOST=0 mise ls-remote gonow returns Go versions🤖 Generated with Claude Code
Note
Switches Go version listing fast path to
git ls-remoteto efficiently retrieve allgo*tags and avoid GitHub API pagination issues.src/plugins/core/go.rs):github::list_tagswithgit ls-remote --tags --refs go*executed viaplugins::core::run_fetch_task_with_timeout.VersionInfo(no dates).github::list_tags_with_datesfor detailed info whenMISE_LIST_ALL_VERSIONSis set.Written by Cursor Bugbot for commit b573a79. This will update automatically on new commits. Configure here.