Skip to content

Conversation

@jdx
Copy link
Owner

@jdx jdx commented Dec 15, 2025

Summary

  • Restores git ls-remote --tags for Go version listing instead of github::list_tags
  • Fixes issue where Go returned no versions because golang/go has 500+ tags and the "go1.x" version tags aren't on the first page of GitHub API results

Background

The recent change in #7305 switched Go from git ls-remote to github::list_tags(). However, this broke Go version listing because:

  1. The golang/go repo has 500+ tags
  2. GitHub API returns tags in alphabetical order, so older tags like "weekly.*" come first
  3. github::list_tags() only fetches the first page by default (when MISE_LIST_ALL_VERSIONS is not set)
  4. The actual version tags (go1.x) are on later pages

The original git ls-remote --tags approach fetches all tags efficiently in a single call, filtered server-side to only "go*" tags.

Test plan

  • mise run lint-fix passes
  • MISE_USE_VERSIONS_HOST=0 mise ls-remote go now returns Go versions

🤖 Generated with Claude Code


Note

Switches Go version listing fast path to git ls-remote to efficiently retrieve all go* tags and avoid GitHub API pagination issues.

  • Go plugin (src/plugins/core/go.rs):
    • Version listing (fast path): Replace github::list_tags with git ls-remote --tags --refs go* executed via plugins::core::run_fetch_task_with_timeout.
      • Parse refs to extract versions, filter invalid patterns, de-duplicate, sort, and map to VersionInfo (no dates).
    • Version listing (slow path): Keep github::list_tags_with_dates for detailed info when MISE_LIST_ALL_VERSIONS is set.

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

Copilot AI review requested due to automatic review settings December 15, 2025 22:39
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 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() with git ls-remote --tags to 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 <[email protected]>
@jdx jdx force-pushed the fix/go-ls-remote branch from 80f8363 to b573a79 Compare December 15, 2025 22:43
@jdx jdx enabled auto-merge (squash) December 15, 2025 22:51
@github-actions
Copy link

Hyperfine Performance

mise x -- echo

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%

@jdx jdx merged commit ce8096e into main Dec 15, 2025
28 checks passed
@jdx jdx deleted the fix/go-ls-remote branch December 15, 2025 23:04
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