Skip to content

github: pick the host's libc variant, with fallback (#279)#283

Merged
eirikb merged 1 commit into
mainfrom
feature/eirikb/fix-musl-glibc-selection
Jun 28, 2026
Merged

github: pick the host's libc variant, with fallback (#279)#283
eirikb merged 1 commit into
mainfrom
feature/eirikb/fix-musl-glibc-selection

Conversation

@eirikb

@eirikb eirikb commented Jun 28, 2026

Copy link
Copy Markdown
Owner

The GitHub-release executor tagged every asset variant=Any, so on a glibc host a *-musl asset was indistinguishable from the glibc one and could be picked - then fail to run (No such file or directory).

Detect musl in the asset name (Linux only) and tag the variant, then prefer the host's libc, dropping the other only when it's the sole build for a given os/arch/version - so a musl-only static linux build still resolves on glibc, and vice versa. Survivors are normalised to Any so the shared matcher doesn't then hard-drop a chosen fallback.

Verified on a glibc host: pnpm (ships both) picks the glibc build; sccache (musl-only) still resolves and runs.

The GitHub-release executor tagged every asset variant=Any, so on a
glibc host a `*-musl` asset was indistinguishable from the glibc one
and could be picked - then fail to run (No such file or directory).

Detect musl in the asset name (Linux only) and tag the variant, then
prefer the host's libc, dropping the other only when it's the sole
build for a given os/arch/version - so a musl-only static linux build
still resolves on glibc, and vice versa. Survivors are normalised to
Any so the shared matcher doesn't then hard-drop a chosen fallback.

Verified on a glibc host: pnpm (ships both) picks the glibc build;
sccache (musl-only) still resolves and runs.
@eirikb
eirikb enabled auto-merge (squash) June 28, 2026 20:38
@eirikb
eirikb merged commit e909383 into main Jun 28, 2026
315 of 332 checks passed
@eirikb
eirikb deleted the feature/eirikb/fix-musl-glibc-selection branch June 28, 2026 20:53
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.

1 participant