pnpm/.github/workflows
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Zoltan Kochan 963e5e1e28
fix: strip the symbol table from release binaries again (#18369)
<!-- A maintainer will only start reviewing once CodeRabbit has approved
and
CI is green. Please wait for those to pass before expecting human
review. -->

## Summary

Release binaries have shipped with their symbol table since pnpm 12.23.0
and pnpr 0.1.0-alpha.22. This restores `strip = "symbols"` for them and
adds a release gate that rejects an unstripped binary.

### Cause

pnpm/pnpm#16589 added `[profile.release.package.<root crate>]` overrides
so that fat LTO keeps optimizing at level 3. A package override that
does not set `strip` resets it to Cargo's default. With `debug = false`
that default is `debuginfo`, which keeps the symbol table. The root
crate's value is the one the linker gets.

A two-line Cargo project reproduces it: `strip = "symbols"` in
`[profile.release]` plus a `[profile.release.package.<name>]` section
with only `opt-level` gives an unstripped binary, and adding `strip` to
the override strips it again.

### Effect on the published artifacts

Stripping each published ELF and Mach-O binary with `llvm-strip`
removes:

| Artifact | Binaries | Smallest reduction | Largest reduction |
|---|---|---|---|
| `pnpm` 12.23.0 | 14 | 10.5 MB (Linux s390x) | 13.4 MB (Linux arm64) |
| `@pnpm/napi` 12.23.0 | 12 | 9.2 MB (macOS x64) | 11.7 MB (Linux arm64)
|
| `pnpr` 0.1.0-alpha.22 | 6 | 11.5 MB (macOS) | 14.4 MB (Linux arm64) |

On Linux x64, `pnpm` goes from 70.4 MB to 59.3 MB. Windows is not
affected, because its symbols are in a separate PDB.

### Changes

- `Cargo.toml`: each root-crate override repeats `strip = "symbols"`.
`release-debug` inherits those overrides, so it sets `strip = false` for
the same crates to keep its symbols.
- `.github/scripts/assert-stripped.mjs`: rejects an ELF binary with a
`SHT_SYMTAB` section and a Mach-O binary whose `LC_DYSYMTAB` counts
local symbols. It fails on any other format.
- `release.yml`: the gate runs on the pnpm and NAPI artifacts in
`verify-rust-artifacts` and on the pnpr artifacts in
`verify-pnpr-artifacts`, next to the existing Windows runtime check.
- `pacquet-integrated-benchmark.yml`: the gate also runs on the HEAD
`pnpm` and `pnpr` binaries of the build job. That job is the only one on
a pull request that builds with the release profile, so a profile change
that keeps the symbol table fails there. A `head_ref` dispatch builds
another revision, so the step skips it. The NAPI addon has no
release-profile build on a pull request and is covered at release time
only.

### Verification

- Cargo's unit graph resolves `strip` to `symbols` for `pnpm`, `pnpr`,
`pnpm_napi` and `micro-benchmark` under `release` and `napi-release`,
and to none under `release-debug`. Before the change it resolved to
`debuginfo`.
- A Linux x64 release build of `pnpm` is 59.1 MB and passes the gate.
The same build on `main` is 70.3 MB and fails it.
- On the binaries the benchmark build job produced for the first commit
of this PR, the gate passes HEAD's `pnpm` and `pnpr` and rejects both of
`main`'s. The step itself has since run and passed in that job.
- The gate passes the published 12.21.0, 12.22.0 and 0.1.0-alpha.21
binaries and rejects the 12.23.0 and 0.1.0-alpha.22 ones, across Linux
x64 and s390x, macOS, FreeBSD, NetBSD and Android.
- Both release workflow steps were run locally in a directory laid out
like the verify jobs, including the `pnpm-lock.yaml`, archive, checksum
and Windows files they have to skip.

Not verified: the release workflow steps themselves only run on a
release tag, and I built only the Linux x64 `pnpm` binary locally. The
other targets and the NAPI addon rest on the unit graph.

## Checklist

- [x] Added a changeset (`pnpm changeset`) if this PR changes any
published
package. Keep it short and written for pnpm users — it becomes a release
note.
- [x] Added or updated tests.

---
Written by an agent (Claude Code, claude-fable-5-2).

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Improvements**
* Release binaries are smaller on Linux and macOS: `pnpm` is 10–13 MB
smaller, the NAPI addon is 9–12 MB smaller, and `pnpr` is 11–14 MB
smaller.
* These binaries no longer include symbol names used only by debuggers.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 00:43:51 +01:00
..
audit.yml chore: update dependencies, Node.js, pnpm, and GitHub Actions (#18115) 2026-11-14 11:55:56 +01:00
cancel-unapproved-workflows.yml ci: delete expired approval-held runs instead of cancelling them (#17546) 2026-11-03 22:27:28 +01:00
cargo-equivalence.yml chore: update dependencies, Node.js, pnpm, and GitHub Actions (#18355) 2026-11-22 14:49:34 +01:00
ci-performance-bencher-upload.yml chore: move pnpm v11 off main to the release/11 branch (#18358) 2026-11-22 19:13:38 +01:00
ci.yml fix: strip the symbol table from release binaries again (#18369) 2026-11-23 00:43:51 +01:00
codeql-analysis.yml chore: update dependencies, Node.js, pnpm, and GitHub Actions (#18348) 2026-11-22 11:31:15 +01:00
create-release-pr.yml chore: rename the pacquet workspace package to pnpm (#18363) 2026-11-22 21:48:34 +01:00
docker.yml ci(docker): verify the release assets before trusting their checksums (#13740) 2026-11-20 16:55:05 +01:00
docs.yml ci: preview only the documentation lines main holds (#18367) 2026-11-23 00:42:32 +01:00
ecosystem-e2e.yml chore: move pnpm v11 off main to the release/11 branch (#18358) 2026-11-22 19:13:38 +01:00
netbsd-vm.yml feat(release): build NetBSD x64 binaries natively in a VM (#17830) 2026-11-07 12:25:37 +01:00
notify-regression.yml ci: post to Discord when an issue is labeled regression (#13235) 2026-07-23 17:27:34 +02:00
pacquet-cargo-unused.yml chore: update dependencies, Node.js, pnpm, and GitHub Actions (#18355) 2026-11-22 14:49:34 +01:00
pacquet-ci.yml chore: rename the pacquet workspace package to pnpm (#18363) 2026-11-22 21:48:34 +01:00
pacquet-codecov.yml chore: update dependencies, Node.js, pnpm, and GitHub Actions (#18355) 2026-11-22 14:49:34 +01:00
pacquet-engine-size.yml chore: rename the pacquet workspace package to pnpm (#18363) 2026-11-22 21:48:34 +01:00
pacquet-integrated-benchmark-comment.yml chore: update dependencies, Node.js, pnpm, and GitHub Actions (#18128) 2026-11-15 11:09:59 +01:00
pacquet-integrated-benchmark.yml fix: strip the symbol table from release binaries again (#18369) 2026-11-23 00:43:51 +01:00
pacquet-micro-benchmark.yml chore: move pnpm v11 off main to the release/11 branch (#18358) 2026-11-22 19:13:38 +01:00
peer-resolution-oracles.yml chore: update dependencies, Node.js, pnpm, and GitHub Actions (#18355) 2026-11-22 14:49:34 +01:00
pnpm-wasm.yml test(wasm): build the Vite app in its own WebContainer session (#18300) 2026-11-21 17:40:50 +01:00
pr-review-automation-privileged.yml fix(pnpr): gate server-only error variants behind server feature (#16972) 2026-10-18 14:45:10 +02:00
pr-review-automation.yml ci: migrate workflows to Blacksmith runners (#13043) 2026-07-15 20:56:23 +02:00
prose.yml chore: move clippy, cargo-deny, and Vale style config into .config (#18139) 2026-11-15 23:09:29 +01:00
release.yml fix: strip the symbol table from release binaries again (#18369) 2026-11-23 00:43:51 +01:00
sync-docs.yml ci: preview only the documentation lines main holds (#18367) 2026-11-23 00:42:32 +01:00
triage-issues.yml chore: update dependencies, Node.js, pnpm, and GitHub Actions (#18287) 2026-11-21 00:31:40 +01:00
update-latest.yml chore(deps): bump the github-actions group across 1 directory with 2 updates (#16672) 2026-11-20 17:03:29 +01:00
update-lockfile.yml chore(git/hooks): replace husky and commitlint with native dependency-free hooks (#12694) 2026-11-21 00:50:23 +01:00
version-switch-matrix.yml test: stop reading the v11 tree from v12 tests and tooling (#18357) 2026-11-22 18:02:38 +01:00
zizmor.yml chore: update dependencies, Node.js, pnpm, and GitHub Actions (#17711) 2026-11-05 03:06:20 +01:00