Skip to content

fix: use bundled bb binary in aztec compile instead of $PATH#21387

Merged
nventuro merged 1 commit into
nextfrom
claudebox/bb8c2dc73d2d3975-2
Mar 13, 2026
Merged

fix: use bundled bb binary in aztec compile instead of $PATH#21387
nventuro merged 1 commit into
nextfrom
claudebox/bb8c2dc73d2d3975-2

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

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

@ludamad ludamad marked this pull request as ready for review March 12, 2026 18:21
## 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
@AztecBot AztecBot force-pushed the claudebox/bb8c2dc73d2d3975-2 branch from 8b9e6f8 to ccc301b Compare March 12, 2026 18:53
@AztecBot AztecBot enabled auto-merge March 12, 2026 18:53
@AztecBot AztecBot added this pull request to the merge queue Mar 12, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 12, 2026
@nventuro nventuro enabled auto-merge March 13, 2026 03:18
@nventuro nventuro added this pull request to the merge queue Mar 13, 2026
Merged via the queue into next with commit 9128acd Mar 13, 2026
32 checks passed
@nventuro nventuro deleted the claudebox/bb8c2dc73d2d3975-2 branch March 13, 2026 03:54
@AztecBot

Copy link
Copy Markdown
Collaborator Author

❌ Failed to cherry-pick to v4-next due to conflicts. (🤖) View backport run.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] aztec compile fails when system bb differs from bundled version

3 participants