Skip to content

feat: Add MSVC asset matching on Windows#6798

Merged
jdx merged 1 commit intojdx:mainfrom
trolleyman:msvc-asset-matcher
Oct 29, 2025
Merged

feat: Add MSVC asset matching on Windows#6798
jdx merged 1 commit intojdx:mainfrom
trolleyman:msvc-asset-matcher

Conversation

@trolleyman
Copy link
Copy Markdown
Contributor

@trolleyman trolleyman commented Oct 28, 2025

See #6726

Adds MSVC asset detection, and modifies the matcher to prefer it for Windows builds


Note

Adds MSVC libc detection and preference for Windows asset selection, updates docs to mention MSVC, expands tests, and improves an aqua error message.

  • Backend – asset detection:
    • Add Msvc to AssetLibc with matching regex; detect libc for Windows as well as Linux.
    • AssetPicker now sets target libc to msvc on Windows and scores libc on Windows; prefers MSVC over GNU.
  • Tests:
    • Add Windows MSVC/GNU URL detection and scoring tests; verify MSVC preference; extend ripgrep tests for Windows.
  • Docs:
    • Update docs/dev-tools/backends/{github,gitlab}.md to include MSVC in libc autodetection.
    • Update docs/dev-tools/backends/ubi.md matching option to mention "msvc".
  • Aqua backend:
    • Enhance unsupported env error to include supported envs in message.

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

@trolleyman trolleyman changed the title Add msvc asset matching on Windows feat: Add MSVC asset matching on Windows Oct 28, 2025
@trolleyman trolleyman marked this pull request as ready for review October 28, 2025 23:36
@jdx
Copy link
Copy Markdown
Owner

jdx commented Oct 29, 2025

bugbot run

Copy link
Copy Markdown

@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.

Bug: Test Fails on Non-Musl Builds

The test unconditionally expects the musl variant to be picked on line 588, but when the build is not musl (i.e., when cfg!(target_env = "musl") is false), the gnu variant should be preferred since the AssetPicker is initialized with target_libc="gnu" (line 179). This test will fail on non-musl builds. It should be conditional like the similar test at lines 422-428.

src/backend/asset_detector.rs#L584-L588

// Test Linux x86_64 - should prefer musl over other variants when only musl is available
let picker = AssetPicker::new("linux".to_string(), "x86_64".to_string());
let picked = picker.pick_best_asset(&ripgrep_assets).unwrap();
assert_eq!(picked, "ripgrep-14.1.1-x86_64-unknown-linux-musl.tar.gz");

Fix in Cursor Fix in Web


@jdx jdx merged commit 3b5efb6 into jdx:main Oct 29, 2025
31 of 32 checks passed
@trolleyman trolleyman deleted the msvc-asset-matcher branch October 29, 2025 21:40
@trolleyman
Copy link
Copy Markdown
Contributor Author

Thanks for the speedy review :D

jdx pushed a commit that referenced this pull request Oct 29, 2025
### 📦 Registry

- add cpz and rmz by @sassdavid in
[#6793](#6793)

### 🚀 Features

- Add MSVC asset matching on Windows by @trolleyman in
[#6798](#6798)

### 🐛 Bug Fixes

- **(cache)** exclude http backend tarballs from autoprune by @jdx in
[#6806](#6806)
- **(ci)** prevent release job from running when dependencies fail by
@jdx in [#6804](#6804)
- **(fish)** remove --move flag from fish_add_path to prevent PATH
corruption by @jdx in [#6800](#6800)
- **(tasks)** support local .config/mise/conf.d/*.toml tasks by @syhol
in [#6792](#6792)

### 📚 Documentation

- change 'claude-code' to 'claude' in examples by @bradleybuda in
[#6801](#6801)

### New Contributors

- @trolleyman made their first contribution in
[#6798](#6798)
- @bradleybuda made their first contribution in
[#6801](#6801)

## 📦 Aqua Registry Updates

#### New Packages (2)

- [`jreisinger/checkip`](https://github.com/jreisinger/checkip)
-
[`suzuki-shunsuke/ghaperf`](https://github.com/suzuki-shunsuke/ghaperf)
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