Skip to content

Commit

Permalink
fix: update bootstrap compilation order (#1398)
Browse files Browse the repository at this point in the history
Eth and Aztec contracts are currently built before the update constants
script runs, potentially leading to stale artifacts being compiled. This
is currently not an issue as artifacts are commited, however i could
forsee it becoming one.
  • Loading branch information
Maddiaa0 authored Aug 3, 2023
1 parent 2c43878 commit c03a6fa
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ if [ ! -f ~/.nvm/nvm.sh ]; then
fi

circuits/cpp/bootstrap.sh
l1-contracts/bootstrap.sh

if [ "$(uname)" = "Darwin" ]; then
# works around https://github.com/AztecProtocol/aztec3-packages/issues/158
Expand All @@ -49,22 +48,24 @@ cd yarn-project
yarn install --immutable

# Build the necessary dependencies for noir contracts typegen.
for DIR in foundation noir-compiler; do
for DIR in foundation noir-compiler circuits.js; do
echo "Building $DIR..."
cd $DIR
yarn build
cd ..
done

cd noir-contracts && ./bootstrap.sh
# Run remake bindings before building noir contracts or l1 contracts as they depend on files created by it.
yarn --cwd circuits.js remake-bindings
yarn --cwd circuits.js remake-constants

(cd noir-contracts && ./bootstrap.sh)
(cd .. && l1-contracts/bootstrap.sh)

# Until we push .yarn/cache, we still need to install.
cd ../
yarn
# We do not need to build individual packages, yarn build will build the root tsconfig.json
yarn build
yarn --cwd circuits.js remake-bindings
yarn --cwd circuits.js remake-constants
cd ..

echo
Expand Down

0 comments on commit c03a6fa

Please sign in to comment.