fix(bun): use native windows-arm64 build for Bun >= 1.3.10#10150
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for native Windows ARM64 archives in the Bun plugin, which started publishing with version 1.3.10. For older versions, the plugin falls back to x64-baseline under emulation. The changes refactor the architecture and asset filename resolution to be version-aware, consolidate the platform-specific fallback logic, and add comprehensive unit tests to verify the cutover behavior and prevent regressions on other platforms. No review comments were provided, so there is no additional feedback.
Greptile SummaryThis PR enables native Windows ARM64 (
Confidence Score: 5/5Safe to merge. The change is well-scoped to the Windows ARM64 download path, all other platforms are unchanged, and the cutover logic is covered by unit tests. The Windows ARM64 arch selection is isolated in a single function with clear version-comparison logic. The No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "fix(bun): use native windows-arm64 build..." | Re-trigger Greptile |
Bun started publishing native Windows ARM64 archives (bun-windows-aarch64.zip) in v1.3.10. mise previously always downloaded the x64-baseline build on Windows ARM64, forcing emulation. Select the native aarch64 archive for Bun >= 1.3.10 and keep the x64-baseline fallback for older releases. The arch-resolution logic for the current system and for lockfile targets is unified into get_bun_arch_for_target so the Windows ARM64 cutover lives in a single place. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
4b2cbfb to
ce6685c
Compare
Problem
The Bun plugin always downloads the
x64-baselinebuild on Windows ARM64, running Bun under x64 emulation. Bun has shipped native Windows ARM64 archives (bun-windows-aarch64.zip) since v1.3.10, but mise never selected them.Closes the request in discussion #10044.
Verified against the upstream Bun releases:
bun-v1.3.9→ onlybun-windows-x64*assets (no aarch64)bun-v1.3.10→ first release withbun-windows-aarch64.zipbun-v1.3.14(latest) →bun-windows-aarch64.zippresentChange
bun-windows-aarch64.zipwhen the Bun version is >= 1.3.10, and keep thex64-baselinefallback for older releases.get_bun_arch_with_variants) and for lockfile/platform targets (get_bun_arch_for_target) so the Windows ARM64 cutover lives in a single place. The download URL, the extracted directory name, and the lockfile asset/checksum all derive from the samebun-{os}-{arch}.ziphelper, keeping them in sync.current_platform_target→get_platform_variant).canary) prefer the native aarch64 archive rather than forcing x64 emulation.All other platforms/variants (linux & macos x64/arm64, musl/baseline, windows x64) are unchanged.
This supersedes the earlier closed PRs #10045 and #10063, which took the same approach but stalled on unrelated Windows ARM64 CI runner issues.
Tests
Added unit tests in
src/plugins/core/bun.rs:windows_arm64_asset_filename_matches_bun_release_cutover—1.3.9→x64-baseline;1.3.10/v1.3.10/bun-v1.3.10/canary→aarch64.bun_asset_filename_preserves_platform_variants— regression guard that every other platform/variant keeps its existing asset name.