fix(docs): pull bb.js runtime deps via portal in examples#24510
Open
charlielye wants to merge 2 commits into
Open
fix(docs): pull bb.js runtime deps via portal in examples#24510charlielye wants to merge 2 commits into
charlielye wants to merge 2 commits into
Conversation
…ng them The recursive_verification example links @aztec/bb.js via link:, which does not install the linked package's own dependencies, so the config hand-listed bb.js's runtime deps (pako, msgpackr, comlink, idb-keyval, commander, tslib). They were unversioned, so the bootstrap ran 'yarn add pako' = latest; when pako 3.0.0 (2026-06-26) dropped the ESM default export bb.js's 'import pako from pako' relies on, ci/docs/examples/bootstrap.sh execute broke on every fresh install. Add portal: support to the examples dependency parser and pull bb.js via portal:, which installs its dependencies at the versions bb.js pins (pako resolves to 2.2.0, not 3.0.0). Delete the hand-mirrored npm list: bb.js's own package.json is now the single source of truth, so this class of drift/float regression can't recur. link: (no dep install) remains for the noir packages.
…example Switching bb.js to portal: fixed bb.js's own pako import but surfaced a second pako consumer: @aztec/noir-noir_js (used in its debug.mjs) also declares pako ^2.1.0. It is link:'d (not portal:'d) because its @aztec/noir-* siblings are pinned to unpublished 1.0.0-beta.21 versions that portal cannot fetch, and link: does not install a package's own deps — so noir_js's pako must be supplied explicitly. Pinned to noir_js's own range (^2.1.0) so it can't float to the breaking pako 3.0.0 (dropped ESM default export).
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.
Problem
ci/docs/examples/bootstrap.sh executeis failing repo-wide (every fresh install since 2026-06-26) with:Root cause
The
recursive_verificationexample links@aztec/bb.jsvia yarn'slink:protocol, which symlinks the package but does not install its own dependencies. To compensate, the example'sconfig.yamlhand-listed bb.js's runtime deps (pako,msgpackr,comlink,idb-keyval,commander,tslib) — but unversioned (npm:pako). The bootstrap turns those intoyarn add pako= latest.pako@3.0.0(published 2026-06-26) dropped the CommonJS/ESM default export (its ESM entry moved to named-exports-only), so bb.js'simport pako from 'pako'throws under the runner'stsx/esm+--preserve-symlinks. Pre-06-26 the same bare install resolved 2.2.0 and worked; that's why oldernextruns were green.Fix
Add
portal:support to the examples dependency parser (lib.sh/bootstrap.sh) and pull bb.js viaportal:instead oflink:+ a hand-mirrored dep list.portal:installs the package's declared dependencies at the versions it pins, so:pakoresolves to 2.2.0 (bb.js pins^2.1.0), not 3.0.0.npm:list is deleted — bb.js's ownpackage.jsonis the single source of truth, so this drift/float class of regression can't recur.link:(which intentionally does not install deps) remains for the noir packages.Verification
import pako from 'pako'works on 2.1.0/2.2.0, throws the exact CI error on 3.0.0.yarn add @aztec/bb.js@portal:<path>installs bb.js's transitive deps at its pinned ranges (pako 2.2.0, msgpackr 1.12.1, comlink 4.4.2); yarn itself notes portal +--preserve-symlinksis the intended pairing (which the runner already uses).@aztec/bb.js@portal:<repo>/barretenberg/ts/bb.jswith no manual npm deps and no warnings;bash -nclean.docs/examplesexecute pipeline (needs the built monorepo + a live network) — relying on CI for the end-to-end confirmation.