Skip to content

feat: fall back to Node.js unofficial builds for platforms like linux-arm64-musl - #1

Draft
sentry-junior[bot] wants to merge 1 commit into
mainfrom
feat/unofficial-node-builds
Draft

sentry-junior[bot] wants to merge 1 commit into
mainfrom
feat/unofficial-node-builds

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 26, 2026

Copy link
Copy Markdown

nodejs.org has no linux-arm64-musl build, but the Node.js unofficial-builds project publishes one with the same archive name and layout. This makes -p linux-arm64-musl work, which getsentry/toolkit#2513 needs.

  • getNodeBinary tries nodejs.org/dist first. On a 404 it falls back to unofficial-builds.nodejs.org/download/release and logs that it did. Any other HTTP error still fails right away. It falls back on 404 instead of reading index.json files because those names don't match the archive names (osx-arm64-tar vs darwin-arm64).
  • Every download, from either source, is hashed as it streams and checked against that source's SHASUMS256.txt for the release. On a mismatch the build fails and the temp archive is deleted, so nothing unverified lands in the cache.
  • When neither source has the build, the error lists both URLs that were tried.
  • The README gets a Platforms section. It notes that unofficial musl coverage varies by Node version (22.14.0 has no linux-arm64-musl, 24.9.0+ and 26.x do), and that musl binaries need libstdc++ and libatomic on Alpine.

Out of scope: the host platform is still detected as <os>-<arch>, so on an Alpine host with no -p, fossilize picks the glibc build and doesn't embed a code cache for a -musl target.

An upstream PR to BYK/fossilize from this branch follows.

via @BYK.

--

View Session [Sentry]

…-arm64-musl

nodejs.org ships no linux-arm64-musl build, but the Node.js unofficial-builds
project publishes one with the same archive layout. When the official archive
404s, download it from unofficial-builds.nodejs.org instead. Every download is
now checked against the release's SHASUMS256.txt, and when neither source has
the platform the error lists the URLs that were tried.
@sentry-junior

sentry-junior Bot commented Nov 26, 2026

Copy link
Copy Markdown
Author

Refs BYK#39

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