Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Update test expectations to match the new multi-version lockfile format: - Change [tools.tool] to [[tools.tool]] in test assertions - Update lockfile use and latest tests for consistency - Maintain test functionality while adapting to new format 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1f1449f to
b5de99a
Compare
fd92a47 to
2c494f6
Compare
- Fix import paths for PlatformTarget in bun.rs and node.rs - Update lock.rs to use correct message for test compatibility - Ensure all imports use platform_target::PlatformTarget path 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull Request Overview
This PR implements metadata fetching capabilities for Node.js and Bun backends to enable lockfile generation without requiring tool installation. The implementation provides platform-specific download URLs by integrating with each tool's distribution mechanisms.
Key changes:
- Implements
get_tarball_url()for Node.js using mirror-based downloads with proper platform mapping - Implements
get_github_release_info()for Bun using GitHub release-based downloads with asset pattern matching - Adds comprehensive test coverage for the new
PlatformTargetfunctionality
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/plugins/core/node.rs |
Adds tarball URL generation with Node.js platform mapping and mirror URL construction |
src/plugins/core/bun.rs |
Adds GitHub release info generation with Bun-specific platform naming conventions |
src/backend/platform_target.rs |
Adds unit tests for PlatformTarget creation and platform parsing functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| // ========== Lockfile Metadata Fetching Implementation ========== |
There was a problem hiding this comment.
[nitpick] Remove the extra blank line before the comment to maintain consistent spacing with the rest of the file.
|
|
||
| // ========== Lockfile Metadata Fetching Implementation ========== |
There was a problem hiding this comment.
[nitpick] Remove the extra blank line before the comment to maintain consistent spacing with the rest of the file.
| "macos" => "darwin", | ||
| "linux" => "linux", | ||
| "windows" => "win32", | ||
| other => other, |
There was a problem hiding this comment.
[nitpick] Consider logging a warning when encountering unknown OS names to help with debugging platform mapping issues.
| other => other, | |
| other => { | |
| eprintln!( | |
| "Warning: Unknown OS name '{}' encountered in Node.js platform mapping. Passing through as-is.", | |
| other | |
| ); | |
| other | |
| }, |
| "aarch64" => "arm64", | ||
| "loongarch64" => "loong64", | ||
| "riscv64" => "riscv64", | ||
| other => other, |
There was a problem hiding this comment.
[nitpick] Consider logging a warning when encountering unknown architecture names to help with debugging platform mapping issues.
| other => other, | |
| other => { | |
| eprintln!( | |
| "Warning: Unknown architecture name '{}' encountered in build_platform_slug for target: {:?}. Using as-is.", | |
| other, | |
| target | |
| ); | |
| other | |
| }, |
- Fix incorrect Windows platform mapping that generated wrong download URLs - Extract platform mapping logic into static helper functions - Add map_os() and map_arch() helpers for consistent OS/arch naming - Update Bun plugin to use static methods for consistency The build_platform_slug method was incorrectly mapping Windows to 'win32' when it should use 'win' to match the existing Node.js download logic. This fixes potential installation failures for Windows platforms. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…n backends - Update Node.js os() and arch() functions to use map_os() and map_arch() helpers - Update Bun os() function to use map_os_to_bun() helper - Add get_bun_arch_with_variants() helper for complex Bun arch mappings - Consolidate platform mapping logic for better consistency and maintainability This ensures all platform mappings go through the same helper functions, making the code more maintainable and reducing duplication. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Remove redundant cfg! conditionals since built_info::CFG_OS and OS
already provide the correct OS names ("linux", "macos", "windows").
The conditionals were just mapping these values back to themselves.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
…erns The get_github_release_info method was using simplified architecture mapping that didn't account for Bun's complex variants (musl, baseline). This caused mismatches between lockfile metadata and actual release assets. Changes: - Add get_bun_arch_for_target() to handle platform qualifiers - Update asset pattern generation to use full arch variants - Support musl, baseline, and musl-baseline variants This ensures lockfile metadata correctly references existing Bun release assets like bun-linux-x64-musl.zip and bun-darwin-x64-baseline.zip. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.9.5 x -- echo |
19.1 ± 0.5 | 18.1 | 22.2 | 1.00 |
mise x -- echo |
19.2 ± 0.6 | 18.2 | 22.7 | 1.01 ± 0.04 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.9.5 env |
18.5 ± 0.6 | 17.6 | 22.4 | 1.00 |
mise env |
18.8 ± 0.7 | 17.5 | 21.1 | 1.02 ± 0.05 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.9.5 hook-env |
18.5 ± 0.6 | 17.3 | 20.1 | 1.00 ± 0.05 |
mise hook-env |
18.5 ± 0.6 | 17.4 | 21.1 | 1.00 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.9.5 ls |
16.6 ± 0.4 | 15.8 | 18.0 | 1.00 ± 0.04 |
mise ls |
16.6 ± 0.6 | 15.7 | 20.6 | 1.00 |
xtasks/test/perf
| Command | mise-2025.9.5 | mise | Variance |
|---|---|---|---|
| install (cached) | 165ms | ✅ 102ms | +61% |
| ls (cached) | 62ms | 61ms | +1% |
| bin-paths (cached) | 67ms | 67ms | +0% |
| task-ls (cached) | 472ms | 479ms | -1% |
✅ Performance improvement: install cached is 61%

Add concrete implementations of Backend trait metadata fetching methods:
Node.js Implementation:
Bun Implementation:
These implementations enable lockfile generation without tool installation by providing platform-specific download URLs directly from the tool's distribution source.
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com