Skip to content

fix(release): build kvdb and wsdb cross binaries in the build phase, so staging only packages - #25920

Open
charlielye wants to merge 2 commits into
nextfrom
cl/stage-cross-in-build
Open

charlielye wants to merge 2 commits into
nextfrom
cl/stage-cross-in-build

Conversation

@charlielye

Copy link
Copy Markdown
Contributor

Last night's nightly (log) compiled during "stage release artifacts":

Staging step What it did Time
native-packages/wsdb Fully rebuilt the host binary the build had just made, then cross-compiled 3 platforms 151s
native-packages/kvdb Rebuilt the host addon, then cross-compiled 3 platforms 57s
barretenberg/ts Re-ran its generated packages' yarn install and tsc 75s

The bb, avm-transpiler and ipc-runtime cross builds already ran in the build phase through Makefile targets. kvdb and wsdb had no such targets, so their release did the compiling.

Changes

  • Makefile: new kvdb-cross-<platform> and wsdb-cross-<platform> targets, like ipc-runtime-cross, added to release-foundation. A package's cross builds run one at a time after its host build, because each configure writes into the source tree: kvdb runs yarn, and wsdb regenerates its sources.
  • kvdb and wsdb release: now only package the binaries the build left and stage the tarballs. kvdb refuses if a platform's addon is missing, because prepare_arch_packages.sh would otherwise stage an empty stub package for it.
  • barretenberg/ts release: adds every platform's binaries to the generated packages without recompiling them. The generator writes the same sources for every-platform as for the host-only build; only the binaries differ. I checked this by diffing the generator's output. Regenerating also leaves the compiled dest/ in place.
  • Single denoise: the staging loop, and the private publish loop, now run under one denoise instead of one per project. The full log still has a --- <project> release --- header per project.

Testing (local)

  • Ran make kvdb-cross wsdb-cross: the host builds, then each package's 3 cross builds in order.
  • Ran kvdb and wsdb staging in a sandbox with no npm credential and the registry pointed at a dead address. It compiled nothing: 18s and 15s.
    • All 10 tarballs were staged.
    • The 8 platform binaries in them are byte-identical to the build's outputs.
    • The main packages carry the build's dest/.
  • kvdb red check: with arm64-macos's addon removed, staging fails with a clear message and stages nothing.
  • Loop: the one-denoise loop runs every project in order and stops at the first failure with its exit code.
  • Not run locally: the barretenberg/ts staging path, which needs every bb cross build. It runs only on a release tag, so the next nightly is its first run.

Not included: the remaining Unknown content lines come from wsdb running @aztec-foundation/constants-codegen at its foundation.pin (v7.0.0-nightly.20260926.b), which predates #25917's parser fix. Bumping that pin is a separate decision.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DSxF9AgGYcAcCTjXEeJT4L

…so staging only packages

Staging (bootstrap.sh release) recompiled in three projects: kvdb and wsdb rebuilt their host
binary and cross-compiled the three other platforms inside their release step (151s for wsdb, with
a full rebuild of the host binary the build had just made), and barretenberg/ts re-ran its packages'
yarn install and tsc.

- Makefile: kvdb-cross-<platform> and wsdb-cross-<platform> targets, like ipc-runtime-cross, in
  release-foundation. A package's cross builds run one at a time after its host build, since each
  configure writes into the source tree (kvdb runs yarn, wsdb regenerates its sources).
- kvdb and wsdb release: package the binaries the build left and stage the tarballs. kvdb refuses
  when a platform's addon is missing, as prepare_arch_packages.sh would otherwise publish a stub.
- barretenberg/ts release: adds every platform's binaries to the generated packages without
  recompiling them; the generated sources are the same as the build's.
- The staging loop, and the private publish loop, run under one denoise instead of one per project.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DSxF9AgGYcAcCTjXEeJT4L

This branch has not been deployed

No deployments
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