fix: use bundled bb binary in aztec compile instead of $PATH#21387
Merged
Conversation
ludamad
approved these changes
Mar 11, 2026
## Summary - Export `findBbBinary` from `@aztec/bb.js` public API (was internal-only) - Use bundled bb binary in `aztec compile`, `profile-gates`, and `profile-flamegraph` commands - Resolution order: `$BB` env var > bundled binary > `$PATH` fallback ## Details When a user has a different version of `bb` installed globally (e.g. via `bbup`), `aztec compile` picks it up from `$PATH` instead of using the version bundled with the installation. This causes transpiler errors due to version mismatch. The fix uses the existing `findBbBinary()` helper from `@aztec/bb.js` which detects the platform and returns the path to `build/<arch>/bb`. This is the same approach already used by `@aztec/bb.js`'s own CLI wrapper. Full analysis: https://gist.github.com/AztecBot/46ee397e5df74c2c7a5c383f060bdaba Closes #21384 ClaudeBox log: https://claudebox.work/s/bb8c2dc73d2d3975?run=2
8b9e6f8 to
ccc301b
Compare
Collaborator
Author
|
❌ Failed to cherry-pick to |
ludamad
added a commit
that referenced
this pull request
Mar 13, 2026
… of $PATH (#21468) ## Summary Backport of #21387 to v4-next. Cherry-pick applied cleanly — no conflicts. ## Changes - Export `findBbBinary` from `@aztec/bb.js` public API - Use bundled bb binary in `aztec compile`, `profile-gates`, and `profile-flamegraph` commands - Resolution order: `$BB` env var > bundled binary > `$PATH` fallback Closes #21384 ClaudeBox log: https://claudebox.work/s/b86fc0798bbe3804?run=1
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.
Summary
findBbBinaryfrom@aztec/bb.jspublic API (was internal-only)aztec compile,profile-gates, andprofile-flamegraphcommands$BBenv var > bundled binary >$PATHfallbackDetails
When a user has a different version of
bbinstalled globally (e.g. viabbup),aztec compilepicks it up from$PATHinstead of using the version bundled with the installation. This causes transpiler errors due to version mismatch.The fix uses the existing
findBbBinary()helper from@aztec/bb.jswhich detects the platform and returns the path tobuild/<arch>/bb. This is the same approach already used by@aztec/bb.js's own CLI wrapper.Full analysis: https://gist.github.com/AztecBot/46ee397e5df74c2c7a5c383f060bdaba
Closes #21384
ClaudeBox log: https://claudebox.work/s/bb8c2dc73d2d3975?run=2