Skip to content

Conversation

@risu729
Copy link
Contributor

@risu729 risu729 commented Nov 28, 2025

Note

Resolve strip_components via platform-specific options (with generic fallback) and apply it consistently to cache keys and extraction/install paths.

  • Backend (HTTP):
    • Cache key generation now includes platform-aware strip_components via lookup_platform_key with generic fallback.
    • extract_artifact_to_cache applies platform-aware strip_components when setting tar options.
  • Static Helpers:
    • install_artifact resolves and uses platform-aware strip_components for archive extraction.

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

Copilot AI review requested due to automatic review settings November 28, 2025 15:25
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 adds support for platform-specific strip_components configuration values, allowing different extraction behaviors for different operating systems and architectures. This is particularly useful when archives have different directory structures across platforms.

Key changes:

  • Implements platform-specific lookup for strip_components using the existing lookup_platform_key helper
  • Maintains backward compatibility by falling back to generic strip_components values when platform-specific values are not defined
  • Updates both the cache key generation and extraction logic to support platform-specific values

Reviewed changes

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

File Description
src/backend/static_helpers.rs Modified install_artifact to lookup platform-specific strip_components values with fallback to generic values
src/backend/http.rs Updated cache key generation and extraction logic to support platform-specific strip_components values

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

Comment on lines +196 to +198
let mut strip_components = lookup_platform_key(opts, "strip_components")
.or_else(|| opts.get("strip_components").cloned())
.and_then(|s| s.parse().ok());
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 new platform-specific strip_components functionality lacks test coverage. Consider adding a test similar to test_lookup_platform_key_bin or test_lookup_platform_key_bin_path that verifies strip_components can be looked up using platform-specific keys (e.g., platforms.macos-x64.strip_components or platforms_linux_x64_strip_components) and falls back to the generic strip_components value when a platform-specific value is not available.

Copilot uses AI. Check for mistakes.
Comment on lines +55 to +56
let strip_components = lookup_platform_key(opts, "strip_components")
.or_else(|| opts.get("strip_components").cloned());
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 platform-specific strip_components lookup in the cache key generation lacks test coverage. Since this affects cache key generation and could lead to incorrect cache hits/misses if not working correctly, consider adding tests to verify that:

  1. Platform-specific strip_components values are correctly included in the cache key
  2. Different strip_components values result in different cache keys
  3. The fallback to generic strip_components works correctly

Copilot uses AI. Check for mistakes.
Comment on lines +157 to +159
let mut strip_components = lookup_platform_key(opts, "strip_components")
.or_else(|| opts.get("strip_components").cloned())
.and_then(|s| s.parse().ok());
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 platform-specific strip_components lookup in the extraction logic lacks test coverage. Consider adding tests to verify that platform-specific strip_components values are correctly used during extraction and that the auto-detection logic still works correctly when platform-specific values are not provided.

Copilot uses AI. Check for mistakes.
@jdx
Copy link
Owner

jdx commented Nov 28, 2025

bugbot run

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no bugs!


@jdx jdx merged commit cf61563 into jdx:main Nov 28, 2025
36 checks passed
@risu729 risu729 deleted the platform-specific-strip-components branch November 28, 2025 17:27
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