Skip to content

Conversation

@jdx
Copy link
Owner

@jdx jdx commented Nov 28, 2025

Summary

  • Add get_tarball_url() implementation for deno, go, and zig core backends
  • Enables proper lockfile URL generation for cross-platform lockfiles

deno: URLs from dl.deno.land
go: URLs from dl.google.com/go (respects go_download_mirror setting)
zig: URLs from ziglang.org JSON index with fallback for numbered versions

Test plan

  • Ran mise lock with deno, go, and zig tools
  • Verified URLs are correctly generated for all 5 target platforms
  • All unit tests pass
  • Lint checks pass

Example lockfile output:

[tools.deno.platforms.linux-arm64]
url = "https://dl.deno.land/release/v2.0.0/deno-aarch64-unknown-linux-gnu.zip"

[tools.go.platforms.linux-arm64]
url = "https://dl.google.com/go/go1.22.0.linux-arm64.tar.gz"

[tools.zig.platforms.linux-arm64]
url = "https://ziglang.org/download/0.13.0/zig-linux-aarch64-0.13.0.tar.xz"

🤖 Generated with Claude Code


Note

Implements get_tarball_url for deno/go/zig using PlatformTarget and updates downloads to use these URLs, removing legacy OS/arch helpers.

  • Core backends:
    • deno:
      • Add get_tarball_url() mapping arch/os to dl.deno.land release ZIPs.
      • download() now derives filename from resolved URL and fetches it.
    • go:
      • Add get_tarball_url() using Settings.go_download_mirror, per-OS ext (zip on Windows, tar.gz otherwise), and arch/os mapping.
      • download() now uses resolved URL, computes filename from it, and continues fetching .sha256 for lock/checksum.
    • zig:
      • Add get_tarball_url() resolving via JSON indexes (ziglang.org/machengine.org) with fallback for numeric versions.
      • download() now uses resolved URL while preserving mirror selection and minisign verification.
  • Refactor:
    • Replace hardcoded OS/arch helpers with PlatformTarget::from_current(); remove obsolete helper functions and imports.

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

Add `get_tarball_url()` implementation for three core backends to enable
proper lockfile URL generation:

- deno: URLs from dl.deno.land
- go: URLs from dl.google.com/go (respects go_download_mirror setting)
- zig: URLs from ziglang.org JSON index with fallback for numbered versions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Copilot AI review requested due to automatic review settings November 28, 2025 19:24
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 implements lockfile URL generation support for three core backends (deno, go, and zig) by adding get_tarball_url() methods to each plugin. These URLs enable cross-platform lockfile generation with proper download URLs for different architectures and operating systems.

Key changes:

  • Added platform-to-tool naming convention mapping functions for OS and architecture
  • Implemented get_tarball_url() for each backend with platform-specific URL formatting
  • Zig implementation includes JSON index lookup with fallback for numbered versions

Reviewed changes

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

File Description
src/plugins/core/zig.rs Adds OS/arch mapping helpers and get_tarball_url() with JSON index lookup and direct URL fallback
src/plugins/core/go.rs Adds platform/arch mapping helpers and get_tarball_url() respecting go_download_mirror setting
src/plugins/core/deno.rs Adds OS/arch mapping helpers and get_tarball_url() for dl.deno.land URLs

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

// Fallback: construct URL directly for numbered versions
Ok(Some(format!(
"https://ziglang.org/download/{}/zig-{}-{}-{}.tar.xz",
tv.version, arch, os, tv.version
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

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

The argument order in the format string is incorrect. Based on Zig's URL pattern, it should be os-arch-version but the current code generates arch-os-version. The correct format should be: \"https://ziglang.org/download/{}/zig-{}-{}-{}.tar.xz\", tv.version, os, arch, tv.version

Suggested change
tv.version, arch, os, tv.version
tv.version, os, arch, tv.version

Copilot uses AI. Check for mistakes.
}
}

/// Map arch name from PlatformTarget to Zig's naming convention
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

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

The return type inconsistency between os_for_target (returns &'static str) and arch_for_target (returns &str) suggests the latter should also return &'static str since all match arms return string literals except the catch-all which returns the input. Consider either returning &'static str or adding documentation explaining why the signature differs.

Suggested change
/// Map arch name from PlatformTarget to Zig's naming convention
/// Map arch name from PlatformTarget to Zig's naming convention
///
/// Returns `&str` (not `&'static str`) because the catch-all arm returns
/// the result of `target.arch_name()`, which may not have a `'static` lifetime.
/// This differs from `os_for_target`, which always returns string literals.

Copilot uses AI. Check for mistakes.
autofix-ci bot and others added 4 commits November 28, 2025 19:31
Remove duplicate os/arch mapping functions by consolidating them into
unified helper methods that both download() and get_tarball_url() use.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Have download() call get_tarball_url() directly instead of using
separate tarball_url/resolve_tarball_url helper methods.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Zig download URLs use zig-{os}-{arch}-{version}.tar.xz format.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@jdx jdx enabled auto-merge (squash) November 28, 2025 19:48
@jdx jdx merged commit 8649f0f into main Nov 28, 2025
28 checks passed
@jdx jdx deleted the feat/lockfile-urls-deno-go-zig branch November 28, 2025 19:58
@github-actions
Copy link

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.11.10 x -- echo 20.0 ± 0.2 19.4 22.7 1.00
mise x -- echo 20.0 ± 0.3 19.3 21.4 1.00 ± 0.02

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.11.10 env 19.8 ± 0.6 18.9 24.4 1.01 ± 0.04
mise env 19.7 ± 0.4 18.7 21.8 1.00

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.11.10 hook-env 19.8 ± 0.3 19.0 22.4 1.02 ± 0.03
mise hook-env 19.4 ± 0.5 18.5 24.1 1.00

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.11.10 ls 16.9 ± 0.3 16.2 18.7 1.00
mise ls 17.1 ± 0.4 16.1 18.4 1.01 ± 0.03

xtasks/test/perf

Command mise-2025.11.10 mise Variance
install (cached) 108ms 108ms +0%
ls (cached) 65ms 66ms -1%
bin-paths (cached) 72ms 72ms +0%
task-ls (cached) 428ms 426ms +0%

jdx pushed a commit that referenced this pull request Nov 30, 2025
### 🚀 Features

- **(backend)** add filter_bins option to github/gitlab backends by
@risu729 in [#7105](#7105)
- **(ci)** auto-close PRs from non-maintainers by @jdx in
[#7108](#7108)
- **(conda)** add conda backend for installing packages from conda-forge
by @jdx in [#7139](#7139)
- **(github)** add rename_exe option and switch elm, opam, yt-dlp from
ubi by @jdx in [#7140](#7140)
- **(install)** add --locked flag for strict lockfile mode by @jdx in
[#7098](#7098)
- **(lock)** implement cross-platform lockfile generation by @jdx in
[#7091](#7091)
- **(lockfile)** add options field for tool artifact identity by @jdx in
[#7092](#7092)
- **(lockfile)** add env field and local lockfile support by @jdx in
[#7099](#7099)
- **(lockfile)** add URL support for deno, go, and zig backends by @jdx
in [#7112](#7112)
- **(lockfile)** add URL support for vfox backend by @jdx in
[#7114](#7114)
- **(lockfile)** add multi-platform checksums without downloading
tarballs by @jdx in [#7113](#7113)

### 🐛 Bug Fixes

- **(backend)** allow platform-specific strip_components by @risu729 in
[#7106](#7106)
- **(backend)** prefer path root for bin path if it contains an
executable by @risu729 in [#7151](#7151)
- **(bash)** avoid deactivate error on (no)unset PROMPT_COMMAND by @scop
in [#7096](#7096)
- **(ci)** use updatedAt instead of createdAt for stale PR detection by
@jdx in [#7109](#7109)
- **(github)** search subdirectories for executables in
discover_bin_paths by @jdx in
[#7138](#7138)
- **(lockfile)** combine api_url with asset_pattern for GitHub release
URLs by @jdx in [#7111](#7111)

### 🚜 Refactor

- **(lock)** simplify lockfile to always use array format by @jdx in
[#7093](#7093)
- **(lockfile)** use compact inline table format by @jdx in
[#7141](#7141)

### 📚 Documentation

- **(gitlab)** document rename_exe option also for gitlab backend by
@risu729 in [#7149](#7149)
- **(lockfile)** update documentation for recent lockfile changes by
@jdx in [#7107](#7107)
- **(node)** use config_root in _.path for pnpm example by @risu729 in
[#7146](#7146)
- **(registry)** add github/gitlab backends to the preferred backends
list by @risu729 in [#7148](#7148)
- **(registry)** add url mappings for all backends by @risu729 in
[#7147](#7147)

### 📦️ Dependency Updates

- update docker/metadata-action digest to c299e40 by @renovate[bot] in
[#7101](#7101)
- update ghcr.io/jdx/mise:alpine docker digest to 693c5f6 by
@renovate[bot] in [#7102](#7102)
- update ghcr.io/jdx/mise:deb docker digest to 9985cab by @renovate[bot]
in [#7104](#7104)
- update ghcr.io/jdx/mise:copr docker digest to 564d8e1 by
@renovate[bot] in [#7103](#7103)
- update rust crate ubi to 0.8.4 by @risu729 in
[#7154](#7154)

### 📦 Registry

- add aqua backend as primary for e1s by @jdx in
[#7115](#7115)
- add gem backend for bashly by @jdx in
[6af6607](6af6607)
- switch 1password from asdf to vfox backend by @jdx in
[#7116](#7116)
- add vfox backend for bfs by @jdx in
[#7126](#7126)
- add github backend for btrace by @jdx in
[#7129](#7129)
- add github backend for cf by @jdx in
[#7131](#7131)
- add vfox backend for bpkg by @jdx in
[#7130](#7130)
- switch apollo-ios from asdf to github backend by @jdx in
[#7118](#7118)
- add vfox backend for chromedriver by @jdx in
[#7134](#7134)
- switch superhtml, vespa-cli, xcsift from ubi to github backend by @jdx
in [#7137](#7137)
- add vfox backend for clickhouse by @jdx in
[#7136](#7136)
- switch chicken to vfox plugin by @jdx in
[#7135](#7135)
- switch chezscheme from asdf to vfox backend by @jdx in
[#7132](#7132)
- add vfox backend for carthage by @jdx in
[#7133](#7133)
- switch azure-functions-core-tools from asdf to vfox backend by @jdx in
[#7128](#7128)
- switch aapt2 to vfox backend by @jdx in
[#7117](#7117)
- switch ant to vfox backend by @jdx in
[#7119](#7119)
- switch asciidoctorj from asdf to vfox backend by @jdx in
[#7121](#7121)
- switch awscli-local to pipx backend by @jdx in
[#7120](#7120)
- add omnictl by @risu729 in
[#7145](#7145)
- remove pnpm asdf plugin from fallback by @risu729 in
[#7143](#7143)
- switch tanzu to github backend by @jdx in
[#7124](#7124)
- switch android-sdk to vfox plugin by @jdx in
[#7127](#7127)
- add vfox backend for ag (The Silver Searcher) by @jdx in
[#7122](#7122)

### Chore

- **(registry)** ignore deleted tools in test-tool workflow by @risu729
in [#7081](#7081)
- **(release)** show registry section last in changelog by @jdx in
[#7156](#7156)
- update mise.lock with checksums by @jdx in
[71e9123](71e9123)
- disable cancel-in-progress for test workflow on main branch by
@risu729 in [#7152](#7152)

## 📦 Aqua Registry Updates

#### Updated Packages (1)

- [`orf/gping`](https://github.com/orf/gping)
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