Select musllinux wheel tag for uv on musl-based distros#1628
Merged
j178 merged 1 commit intoj178:masterfrom Feb 12, 2026
Merged
Select musllinux wheel tag for uv on musl-based distros#1628j178 merged 1 commit intoj178:masterfrom
j178 merged 1 commit intoj178:masterfrom
Conversation
On musl-based systems (e.g. Alpine), prek downloaded a glibc-linked uv binary from PyPI wheels, which failed with relocation errors. Resolve by matching HOST.environment to select the correct musllinux wheel platform tag for x86_64, i686, and armv7. Validate managed uv before reuse so a previously-cached glibc binary is detected as unusable and re-downloaded with the correct tag. Fix the install helpers to not remove_dir_all the target directory before renaming into it; now that managed uv is validated before reuse, this path is reachable and would produce ENOENT. Use targeted file removal that preserves the parent directory and lock file. Closes j178#1623
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1628 +/- ##
==========================================
+ Coverage 91.75% 91.78% +0.03%
==========================================
Files 96 96
Lines 18795 18915 +120
==========================================
+ Hits 17245 17361 +116
- Misses 1550 1554 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
📦 Cargo Bloat ComparisonBinary size change: +0.00% (23.8 MiB → 23.8 MiB) Expand for cargo-bloat outputHead Branch ResultsBase Branch Results |
abc30ec to
6c2d8a4
Compare
Collaborator
Author
|
@j178 I'm not sure if it's just a glitch on my side, but https://github.com/j178/prek/pull/1628/checks?check_run_id=63350830094 shows as still running for me (for over 1d...)? If you see it too, I think you should cancel it... (I don't have permission :p) |
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #1623
Summary
On musl-based systems (e.g. Alpine), prek downloaded a glibc-linked binary from PyPI wheels, which failed with dynamic linker errors. Match
HOST.environmentto select the correctmusllinux_1_1_*wheel tag for x86_64, i686, and armv7.Also validate managed uv binaries before reuse so a previously-cached glibc binary is detected as incompatible and re-downloaded with the correct tag, and fix the install helpers to use targeted file removal instead of
remove_dir_allon the parent directory.Tests
Triggered Build Binaries workflow run 21935753880 to build artifacts-x86_64-unknown-linux-musl
Released prek MRE (fails)
Downloads glibc-linked uv, crashes:
PR binary (succeeds)
wnload the artifact from CI, then:
Downloads musl-linked uv, hook runs correctly:
Exit code 1 is the hook fixing trailing whitespace, not a failure.