From 3212adc228ba1ab5d60f998fda97672e0a06f62f Mon Sep 17 00:00:00 2001 From: benesjan Date: Tue, 23 Apr 2024 12:21:29 +0000 Subject: [PATCH 1/5] frefactor: renaming as --- README.md | 8 -- boxes/Dockerfile | 2 +- boxes/Earthfile | 2 +- yarn-project/.earthlyignore | 22 ++--- yarn-project/.gitignore | 22 ++--- yarn-project/aztec/package.json | 2 +- yarn-project/aztec/tsconfig.json | 2 +- .../{noir-compiler => builder}/.eslintrc.cjs | 0 .../.prettierignore | 0 .../{noir-compiler => builder}/README.md | 6 +- .../aztec-compile-dest | 0 .../{noir-compiler => builder}/package.json | 2 +- .../{noir-compiler => builder}/src/cli.ts | 0 .../src/cli/codegen.ts | 0 .../src/cli/update/common.ts | 0 .../src/cli/update/github.ts | 0 .../src/cli/update/noir.ts | 0 .../src/cli/update/npm.ts | 0 .../src/cli/update/update.ts | 0 .../src/cli/update/utils.ts | 0 .../src/contract-interface-gen/typescript.ts | 0 .../src/fixtures/test_contract/Nargo.toml | 0 .../src/fixtures/test_contract/src/main.nr | 0 .../src/fixtures/test_lib.zip | Bin .../src/fixtures/test_lib/Nargo.toml | 0 .../src/fixtures/test_lib/src/lib.nr | 0 .../src/fixtures/test_lib/src/module.nr | 0 .../src/fixtures/test_lib/src/module/foo.nr | 0 .../{noir-compiler => builder}/src/index.ts | 0 .../src/mocked_keys.ts | 0 .../{noir-compiler => builder}/src/utils.ts | 0 .../{noir-compiler => builder}/tsconfig.json | 0 yarn-project/deploy_npm.sh | 2 +- yarn-project/noir-contracts.js/package.json | 2 +- .../scripts/generate-types.sh | 2 +- yarn-project/noir-contracts.js/tsconfig.json | 2 +- .../noir-protocol-circuits-types/package.json | 2 +- .../tsconfig.json | 2 +- yarn-project/package.json | 2 +- yarn-project/pxe/package.json | 2 +- yarn-project/pxe/tsconfig.json | 2 +- yarn-project/tsconfig.json | 2 +- yarn-project/typedoc.json | 2 +- yarn-project/yarn.lock | 80 +++++++++--------- 44 files changed, 82 insertions(+), 88 deletions(-) rename yarn-project/{noir-compiler => builder}/.eslintrc.cjs (100%) rename yarn-project/{noir-compiler => builder}/.prettierignore (100%) rename yarn-project/{noir-compiler => builder}/README.md (66%) rename yarn-project/{noir-compiler => builder}/aztec-compile-dest (100%) rename yarn-project/{noir-compiler => builder}/package.json (98%) rename yarn-project/{noir-compiler => builder}/src/cli.ts (100%) rename yarn-project/{noir-compiler => builder}/src/cli/codegen.ts (100%) rename yarn-project/{noir-compiler => builder}/src/cli/update/common.ts (100%) rename yarn-project/{noir-compiler => builder}/src/cli/update/github.ts (100%) rename yarn-project/{noir-compiler => builder}/src/cli/update/noir.ts (100%) rename yarn-project/{noir-compiler => builder}/src/cli/update/npm.ts (100%) rename yarn-project/{noir-compiler => builder}/src/cli/update/update.ts (100%) rename yarn-project/{noir-compiler => builder}/src/cli/update/utils.ts (100%) rename yarn-project/{noir-compiler => builder}/src/contract-interface-gen/typescript.ts (100%) rename yarn-project/{noir-compiler => builder}/src/fixtures/test_contract/Nargo.toml (100%) rename yarn-project/{noir-compiler => builder}/src/fixtures/test_contract/src/main.nr (100%) rename yarn-project/{noir-compiler => builder}/src/fixtures/test_lib.zip (100%) rename yarn-project/{noir-compiler => builder}/src/fixtures/test_lib/Nargo.toml (100%) rename yarn-project/{noir-compiler => builder}/src/fixtures/test_lib/src/lib.nr (100%) rename yarn-project/{noir-compiler => builder}/src/fixtures/test_lib/src/module.nr (100%) rename yarn-project/{noir-compiler => builder}/src/fixtures/test_lib/src/module/foo.nr (100%) rename yarn-project/{noir-compiler => builder}/src/index.ts (100%) rename yarn-project/{noir-compiler => builder}/src/mocked_keys.ts (100%) rename yarn-project/{noir-compiler => builder}/src/utils.ts (100%) rename yarn-project/{noir-compiler => builder}/tsconfig.json (100%) diff --git a/README.md b/README.md index 38e03d97604..82fa8dff1ea 100644 --- a/README.md +++ b/README.md @@ -27,14 +27,6 @@ Alternatively, to just hack on Noir contracts and Typescript, run `./bootstrap.s To build Typescript code, make sure to have [`nvm`](https://github.com/nvm-sh/nvm) (node version manager) installed. -To build noir code, make sure that you are using the version from `yarn-project/noir-compiler/src/noir-version.json`. - -Install nargo by running - -``` -noirup -v TAG_FROM_THE_FILE -``` - ## Continuous Integration This repository uses CircleCI for continuous integration. Build steps are managed using [`build-system`](https://github.com/AztecProtocol/build-system). Small packages are built and tested as part of a docker build operation, while larger ones and end-to-end tests spin up a large AWS spot instance. Each successful build step creates a new docker image that gets tagged with the package name and commit. diff --git a/boxes/Dockerfile b/boxes/Dockerfile index 5809c3a2b5b..bfd99786b63 100644 --- a/boxes/Dockerfile +++ b/boxes/Dockerfile @@ -13,7 +13,7 @@ COPY --from=noir-projects /usr/src/noir-projects/noir-protocol-circuits/crates/t WORKDIR /usr/src/boxes COPY . . ENV AZTEC_NARGO=/usr/src/noir/noir-repo/target/release/nargo -ENV AZTEC_COMPILE=/usr/src/yarn-project/noir-compiler/aztec-compile-dest +ENV AZTEC_COMPILE=/usr/src/yarn-project/builder/aztec-compile-dest RUN yarn RUN npx -y playwright@1.42 install --with-deps ENTRYPOINT ["/bin/sh", "-c"] diff --git a/boxes/Earthfile b/boxes/Earthfile index 77999a36a41..7e882db4d9a 100644 --- a/boxes/Earthfile +++ b/boxes/Earthfile @@ -12,7 +12,7 @@ build: WORKDIR /usr/src/boxes COPY . . ENV AZTEC_NARGO=/usr/src/noir/noir-repo/target/release/nargo - ENV AZTEC_COMPILE=/usr/src/yarn-project/noir-compiler/aztec-compile-dest + ENV AZTEC_COMPILE=/usr/src/yarn-project/builder/aztec-compile-dest RUN yarn && yarn build RUN npx -y playwright@1.42 install --with-deps ENTRYPOINT ["/bin/sh", "-c"] diff --git a/yarn-project/.earthlyignore b/yarn-project/.earthlyignore index 0ca688aac6e..90a25913737 100644 --- a/yarn-project/.earthlyignore +++ b/yarn-project/.earthlyignore @@ -53,17 +53,17 @@ end-to-end/src/web/main.js end-to-end/src/web/main.js.LICENSE.txt entry-points/src/artifacts l1-contracts/generated -noir-compiler/target/ -noir-compiler/proofs/ -noir-compiler/Prover.toml -noir-compiler/Verifier.toml -noir-compiler/noir-protocol-circuits-types/.gitignore wow -noir-compiler/proofs/ -noir-compiler/Prover.toml -noir-compiler/Verifier.toml -noir-compiler/src/target -noir-compiler/src/crs -noir-compiler/src/types +builder/target/ +builder/proofs/ +builder/Prover.toml +builder/Verifier.toml +builder/noir-protocol-circuits-types/.gitignore wow +builder/proofs/ +builder/Prover.toml +builder/Verifier.toml +builder/src/target +builder/src/crs +builder/src/types protocol-contracts/src/artifacts scripts/tmp noir-contracts.js/src diff --git a/yarn-project/.gitignore b/yarn-project/.gitignore index db7a81c9d62..7c86855f16a 100644 --- a/yarn-project/.gitignore +++ b/yarn-project/.gitignore @@ -27,17 +27,17 @@ end-to-end/src/web/main.js.LICENSE.txt entry-points/src/artifacts l1-artifacts/generated l1-contracts/generated -noir-compiler/target/ -noir-compiler/proofs/ -noir-compiler/Prover.toml -noir-compiler/Verifier.toml -noir-compiler/noir-protocol-circuits-types/.gitignore wow -noir-compiler/proofs/ -noir-compiler/Prover.toml -noir-compiler/Verifier.toml -noir-compiler/src/target -noir-compiler/src/crs -noir-compiler/src/types +builder/target/ +builder/proofs/ +builder/Prover.toml +builder/Verifier.toml +builder/noir-protocol-circuits-types/.gitignore wow +builder/proofs/ +builder/Prover.toml +builder/Verifier.toml +builder/src/target +builder/src/crs +builder/src/types noir-protocol-circuits-types/src/types/ protocol-contracts/src/artifacts scripts/tmp diff --git a/yarn-project/aztec/package.json b/yarn-project/aztec/package.json index 923d86a2938..5d3874c5a85 100644 --- a/yarn-project/aztec/package.json +++ b/yarn-project/aztec/package.json @@ -31,6 +31,7 @@ "@aztec/archiver": "workspace:^", "@aztec/aztec-node": "workspace:^", "@aztec/aztec.js": "workspace:^", + "@aztec/builder": "workspace:^", "@aztec/circuit-types": "workspace:^", "@aztec/circuits.js": "workspace:^", "@aztec/entrypoints": "workspace:^", @@ -38,7 +39,6 @@ "@aztec/foundation": "workspace:^", "@aztec/kv-store": "workspace:^", "@aztec/l1-artifacts": "workspace:^", - "@aztec/noir-compiler": "workspace:^", "@aztec/noir-contracts.js": "workspace:^", "@aztec/p2p": "workspace:^", "@aztec/protocol-contracts": "workspace:^", diff --git a/yarn-project/aztec/tsconfig.json b/yarn-project/aztec/tsconfig.json index cb1f515a166..ff9caf3d51b 100644 --- a/yarn-project/aztec/tsconfig.json +++ b/yarn-project/aztec/tsconfig.json @@ -40,7 +40,7 @@ "path": "../l1-artifacts" }, { - "path": "../noir-compiler" + "path": "../builder" }, { "path": "../noir-contracts.js" diff --git a/yarn-project/noir-compiler/.eslintrc.cjs b/yarn-project/builder/.eslintrc.cjs similarity index 100% rename from yarn-project/noir-compiler/.eslintrc.cjs rename to yarn-project/builder/.eslintrc.cjs diff --git a/yarn-project/noir-compiler/.prettierignore b/yarn-project/builder/.prettierignore similarity index 100% rename from yarn-project/noir-compiler/.prettierignore rename to yarn-project/builder/.prettierignore diff --git a/yarn-project/noir-compiler/README.md b/yarn-project/builder/README.md similarity index 66% rename from yarn-project/noir-compiler/README.md rename to yarn-project/builder/README.md index ade6f9bfa0c..81e65fef8aa 100644 --- a/yarn-project/noir-compiler/README.md +++ b/yarn-project/builder/README.md @@ -1,13 +1,15 @@ # Aztec.nr compiler -The Aztec.nr compiler compiles Aztec.nr contracts using nargo and outputs Aztec formatted contract ABIs. The compiler can also generate typescript classes for each contract, as well as Aztec.nr interfaces for calling external functions. +The Aztec.nr compiler compiles Aztec.nr contracts using nargo and outputs Aztec formatted contract ABIs. +The compiler can also generate typescript classes for each contract, as well as Aztec.nr interfaces for calling external functions. +it can also be used to update aztec project dependencies. ## Installation To install the package, run: ```bash -yarn add @aztec/noir-compiler +yarn add @aztec/builder ``` ## Usage diff --git a/yarn-project/noir-compiler/aztec-compile-dest b/yarn-project/builder/aztec-compile-dest similarity index 100% rename from yarn-project/noir-compiler/aztec-compile-dest rename to yarn-project/builder/aztec-compile-dest diff --git a/yarn-project/noir-compiler/package.json b/yarn-project/builder/package.json similarity index 98% rename from yarn-project/noir-compiler/package.json rename to yarn-project/builder/package.json index c35f9e851d5..79170d9d165 100644 --- a/yarn-project/noir-compiler/package.json +++ b/yarn-project/builder/package.json @@ -1,5 +1,5 @@ { - "name": "@aztec/noir-compiler", + "name": "@aztec/builder", "version": "0.1.0", "type": "module", "exports": { diff --git a/yarn-project/noir-compiler/src/cli.ts b/yarn-project/builder/src/cli.ts similarity index 100% rename from yarn-project/noir-compiler/src/cli.ts rename to yarn-project/builder/src/cli.ts diff --git a/yarn-project/noir-compiler/src/cli/codegen.ts b/yarn-project/builder/src/cli/codegen.ts similarity index 100% rename from yarn-project/noir-compiler/src/cli/codegen.ts rename to yarn-project/builder/src/cli/codegen.ts diff --git a/yarn-project/noir-compiler/src/cli/update/common.ts b/yarn-project/builder/src/cli/update/common.ts similarity index 100% rename from yarn-project/noir-compiler/src/cli/update/common.ts rename to yarn-project/builder/src/cli/update/common.ts diff --git a/yarn-project/noir-compiler/src/cli/update/github.ts b/yarn-project/builder/src/cli/update/github.ts similarity index 100% rename from yarn-project/noir-compiler/src/cli/update/github.ts rename to yarn-project/builder/src/cli/update/github.ts diff --git a/yarn-project/noir-compiler/src/cli/update/noir.ts b/yarn-project/builder/src/cli/update/noir.ts similarity index 100% rename from yarn-project/noir-compiler/src/cli/update/noir.ts rename to yarn-project/builder/src/cli/update/noir.ts diff --git a/yarn-project/noir-compiler/src/cli/update/npm.ts b/yarn-project/builder/src/cli/update/npm.ts similarity index 100% rename from yarn-project/noir-compiler/src/cli/update/npm.ts rename to yarn-project/builder/src/cli/update/npm.ts diff --git a/yarn-project/noir-compiler/src/cli/update/update.ts b/yarn-project/builder/src/cli/update/update.ts similarity index 100% rename from yarn-project/noir-compiler/src/cli/update/update.ts rename to yarn-project/builder/src/cli/update/update.ts diff --git a/yarn-project/noir-compiler/src/cli/update/utils.ts b/yarn-project/builder/src/cli/update/utils.ts similarity index 100% rename from yarn-project/noir-compiler/src/cli/update/utils.ts rename to yarn-project/builder/src/cli/update/utils.ts diff --git a/yarn-project/noir-compiler/src/contract-interface-gen/typescript.ts b/yarn-project/builder/src/contract-interface-gen/typescript.ts similarity index 100% rename from yarn-project/noir-compiler/src/contract-interface-gen/typescript.ts rename to yarn-project/builder/src/contract-interface-gen/typescript.ts diff --git a/yarn-project/noir-compiler/src/fixtures/test_contract/Nargo.toml b/yarn-project/builder/src/fixtures/test_contract/Nargo.toml similarity index 100% rename from yarn-project/noir-compiler/src/fixtures/test_contract/Nargo.toml rename to yarn-project/builder/src/fixtures/test_contract/Nargo.toml diff --git a/yarn-project/noir-compiler/src/fixtures/test_contract/src/main.nr b/yarn-project/builder/src/fixtures/test_contract/src/main.nr similarity index 100% rename from yarn-project/noir-compiler/src/fixtures/test_contract/src/main.nr rename to yarn-project/builder/src/fixtures/test_contract/src/main.nr diff --git a/yarn-project/noir-compiler/src/fixtures/test_lib.zip b/yarn-project/builder/src/fixtures/test_lib.zip similarity index 100% rename from yarn-project/noir-compiler/src/fixtures/test_lib.zip rename to yarn-project/builder/src/fixtures/test_lib.zip diff --git a/yarn-project/noir-compiler/src/fixtures/test_lib/Nargo.toml b/yarn-project/builder/src/fixtures/test_lib/Nargo.toml similarity index 100% rename from yarn-project/noir-compiler/src/fixtures/test_lib/Nargo.toml rename to yarn-project/builder/src/fixtures/test_lib/Nargo.toml diff --git a/yarn-project/noir-compiler/src/fixtures/test_lib/src/lib.nr b/yarn-project/builder/src/fixtures/test_lib/src/lib.nr similarity index 100% rename from yarn-project/noir-compiler/src/fixtures/test_lib/src/lib.nr rename to yarn-project/builder/src/fixtures/test_lib/src/lib.nr diff --git a/yarn-project/noir-compiler/src/fixtures/test_lib/src/module.nr b/yarn-project/builder/src/fixtures/test_lib/src/module.nr similarity index 100% rename from yarn-project/noir-compiler/src/fixtures/test_lib/src/module.nr rename to yarn-project/builder/src/fixtures/test_lib/src/module.nr diff --git a/yarn-project/noir-compiler/src/fixtures/test_lib/src/module/foo.nr b/yarn-project/builder/src/fixtures/test_lib/src/module/foo.nr similarity index 100% rename from yarn-project/noir-compiler/src/fixtures/test_lib/src/module/foo.nr rename to yarn-project/builder/src/fixtures/test_lib/src/module/foo.nr diff --git a/yarn-project/noir-compiler/src/index.ts b/yarn-project/builder/src/index.ts similarity index 100% rename from yarn-project/noir-compiler/src/index.ts rename to yarn-project/builder/src/index.ts diff --git a/yarn-project/noir-compiler/src/mocked_keys.ts b/yarn-project/builder/src/mocked_keys.ts similarity index 100% rename from yarn-project/noir-compiler/src/mocked_keys.ts rename to yarn-project/builder/src/mocked_keys.ts diff --git a/yarn-project/noir-compiler/src/utils.ts b/yarn-project/builder/src/utils.ts similarity index 100% rename from yarn-project/noir-compiler/src/utils.ts rename to yarn-project/builder/src/utils.ts diff --git a/yarn-project/noir-compiler/tsconfig.json b/yarn-project/builder/tsconfig.json similarity index 100% rename from yarn-project/noir-compiler/tsconfig.json rename to yarn-project/builder/tsconfig.json diff --git a/yarn-project/deploy_npm.sh b/yarn-project/deploy_npm.sh index 3a08cec3846..b64c347f168 100755 --- a/yarn-project/deploy_npm.sh +++ b/yarn-project/deploy_npm.sh @@ -90,7 +90,7 @@ deploy_package entrypoints deploy_package accounts deploy_package l1-artifacts deploy_package ethereum -deploy_package noir-compiler +deploy_package builder deploy_package noir-contracts.js deploy_package kv-store deploy_package merkle-tree diff --git a/yarn-project/noir-contracts.js/package.json b/yarn-project/noir-contracts.js/package.json index 5d3d3fc7f6c..811ab20a72b 100644 --- a/yarn-project/noir-contracts.js/package.json +++ b/yarn-project/noir-contracts.js/package.json @@ -41,7 +41,7 @@ "tslib": "^2.4.0" }, "devDependencies": { - "@aztec/noir-compiler": "workspace:^", + "@aztec/builder": "workspace:^", "@jest/globals": "^29.5.0", "@types/jest": "^29.5.0", "jest": "^29.5.0", diff --git a/yarn-project/noir-contracts.js/scripts/generate-types.sh b/yarn-project/noir-contracts.js/scripts/generate-types.sh index 6e98b09125b..f7355440508 100755 --- a/yarn-project/noir-contracts.js/scripts/generate-types.sh +++ b/yarn-project/noir-contracts.js/scripts/generate-types.sh @@ -28,7 +28,7 @@ for ABI in $(find ../../noir-projects/noir-contracts/target -maxdepth 1 -type f done # Generate types for the contracts -node --no-warnings ../noir-compiler/dest/cli.js codegen -o $OUT_DIR artifacts +node --no-warnings ../builder/dest/cli.js codegen -o $OUT_DIR artifacts # Append exports for each generated TypeScript file to index.ts find "$OUT_DIR" -maxdepth 1 -type f -name '*.ts' ! -name 'index.ts' | while read -r TS_FILE; do diff --git a/yarn-project/noir-contracts.js/tsconfig.json b/yarn-project/noir-contracts.js/tsconfig.json index 52f76611325..caf5e40c801 100644 --- a/yarn-project/noir-contracts.js/tsconfig.json +++ b/yarn-project/noir-contracts.js/tsconfig.json @@ -10,7 +10,7 @@ "path": "../aztec.js" }, { - "path": "../noir-compiler" + "path": "../builder" } ], "include": [ diff --git a/yarn-project/noir-protocol-circuits-types/package.json b/yarn-project/noir-protocol-circuits-types/package.json index 49c2f916be8..01acd5cc549 100644 --- a/yarn-project/noir-protocol-circuits-types/package.json +++ b/yarn-project/noir-protocol-circuits-types/package.json @@ -37,9 +37,9 @@ } }, "dependencies": { + "@aztec/builder": "workspace:^", "@aztec/circuits.js": "workspace:^", "@aztec/foundation": "workspace:^", - "@aztec/noir-compiler": "workspace:^", "@aztec/types": "workspace:^", "@noir-lang/acvm_js": "portal:../../noir/packages/acvm_js", "@noir-lang/noirc_abi": "portal:../../noir/packages/noirc_abi", diff --git a/yarn-project/noir-protocol-circuits-types/tsconfig.json b/yarn-project/noir-protocol-circuits-types/tsconfig.json index a2e4cd63239..b932dd11a80 100644 --- a/yarn-project/noir-protocol-circuits-types/tsconfig.json +++ b/yarn-project/noir-protocol-circuits-types/tsconfig.json @@ -13,7 +13,7 @@ "path": "../foundation" }, { - "path": "../noir-compiler" + "path": "../builder" }, { "path": "../types" diff --git a/yarn-project/package.json b/yarn-project/package.json index 78df3f10602..7df2db0bf2e 100644 --- a/yarn-project/package.json +++ b/yarn-project/package.json @@ -39,7 +39,7 @@ "kv-store", "l1-artifacts", "merkle-tree", - "noir-compiler", + "builder", "noir-contracts.js", "noir-protocol-circuits-types", "p2p", diff --git a/yarn-project/pxe/package.json b/yarn-project/pxe/package.json index 563ac0c866f..03c104943be 100644 --- a/yarn-project/pxe/package.json +++ b/yarn-project/pxe/package.json @@ -40,13 +40,13 @@ ] }, "dependencies": { + "@aztec/builder": "workspace:^", "@aztec/circuit-types": "workspace:^", "@aztec/circuits.js": "workspace:^", "@aztec/ethereum": "workspace:^", "@aztec/foundation": "workspace:^", "@aztec/key-store": "workspace:^", "@aztec/kv-store": "workspace:^", - "@aztec/noir-compiler": "workspace:^", "@aztec/noir-protocol-circuits-types": "workspace:^", "@aztec/protocol-contracts": "workspace:^", "@aztec/simulator": "workspace:^", diff --git a/yarn-project/pxe/tsconfig.json b/yarn-project/pxe/tsconfig.json index 32d3eb3dda6..e32a4d6aa27 100644 --- a/yarn-project/pxe/tsconfig.json +++ b/yarn-project/pxe/tsconfig.json @@ -25,7 +25,7 @@ "path": "../kv-store" }, { - "path": "../noir-compiler" + "path": "../builder" }, { "path": "../noir-protocol-circuits-types" diff --git a/yarn-project/tsconfig.json b/yarn-project/tsconfig.json index 3fde67b857e..9cd760e9a18 100644 --- a/yarn-project/tsconfig.json +++ b/yarn-project/tsconfig.json @@ -35,7 +35,7 @@ { "path": "l1-artifacts/tsconfig.json" }, { "path": "merkle-tree/tsconfig.json" }, { "path": "noir-contracts.js/tsconfig.json" }, - { "path": "noir-compiler/tsconfig.json" }, + { "path": "builder/tsconfig.json" }, { "path": "noir-protocol-circuits-types/tsconfig.json" }, { "path": "p2p/tsconfig.json" }, { "path": "p2p-bootstrap/tsconfig.json" }, diff --git a/yarn-project/typedoc.json b/yarn-project/typedoc.json index fa3d9891894..90edf2de43f 100644 --- a/yarn-project/typedoc.json +++ b/yarn-project/typedoc.json @@ -11,7 +11,7 @@ "aztec.js", "key-store", "noir-contracts.js", - "noir-compiler", + "builder", "p2p", "prover-client", "aztec-node", diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index 01b7cd8f4e7..71bc7c1bfc0 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -196,6 +196,7 @@ __metadata: "@aztec/archiver": "workspace:^" "@aztec/aztec-node": "workspace:^" "@aztec/aztec.js": "workspace:^" + "@aztec/builder": "workspace:^" "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/entrypoints": "workspace:^" @@ -203,7 +204,6 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/kv-store": "workspace:^" "@aztec/l1-artifacts": "workspace:^" - "@aztec/noir-compiler": "workspace:^" "@aztec/noir-contracts.js": "workspace:^" "@aztec/p2p": "workspace:^" "@aztec/protocol-contracts": "workspace:^" @@ -239,6 +239,42 @@ __metadata: languageName: node linkType: soft +"@aztec/builder@workspace:^, @aztec/builder@workspace:builder": + version: 0.0.0-use.local + resolution: "@aztec/builder@workspace:builder" + dependencies: + "@aztec/circuits.js": "workspace:^" + "@aztec/foundation": "workspace:^" + "@aztec/types": "workspace:^" + "@iarna/toml": ^2.2.5 + "@jest/globals": ^29.5.0 + "@types/fs-extra": ^11.0.1 + "@types/jest": ^29.5.0 + "@types/lodash.camelcase": ^4.3.7 + "@types/lodash.capitalize": ^4.2.7 + "@types/lodash.uniqby": ^4.7.9 + "@types/node": ^18.7.23 + "@types/pako": ^2.0.0 + "@types/semver": ^7.5.4 + base64-js: ^1.5.1 + commander: ^9.0.0 + fs-extra: ^11.1.1 + jest: ^29.5.0 + lodash.camelcase: ^4.3.0 + lodash.capitalize: ^4.2.1 + lodash.uniqby: ^4.7.0 + memfs: ^4.6.0 + pako: ^2.1.0 + semver: ^7.5.4 + ts-node: ^10.9.1 + tslib: ^2.4.0 + typescript: ^5.0.4 + unzipit: ^1.4.3 + bin: + aztec-compile: dest/cli.js + languageName: unknown + linkType: soft + "@aztec/circuit-types@workspace:^, @aztec/circuit-types@workspace:circuit-types": version: 0.0.0-use.local resolution: "@aztec/circuit-types@workspace:circuit-types" @@ -525,48 +561,12 @@ __metadata: languageName: unknown linkType: soft -"@aztec/noir-compiler@workspace:^, @aztec/noir-compiler@workspace:noir-compiler": - version: 0.0.0-use.local - resolution: "@aztec/noir-compiler@workspace:noir-compiler" - dependencies: - "@aztec/circuits.js": "workspace:^" - "@aztec/foundation": "workspace:^" - "@aztec/types": "workspace:^" - "@iarna/toml": ^2.2.5 - "@jest/globals": ^29.5.0 - "@types/fs-extra": ^11.0.1 - "@types/jest": ^29.5.0 - "@types/lodash.camelcase": ^4.3.7 - "@types/lodash.capitalize": ^4.2.7 - "@types/lodash.uniqby": ^4.7.9 - "@types/node": ^18.7.23 - "@types/pako": ^2.0.0 - "@types/semver": ^7.5.4 - base64-js: ^1.5.1 - commander: ^9.0.0 - fs-extra: ^11.1.1 - jest: ^29.5.0 - lodash.camelcase: ^4.3.0 - lodash.capitalize: ^4.2.1 - lodash.uniqby: ^4.7.0 - memfs: ^4.6.0 - pako: ^2.1.0 - semver: ^7.5.4 - ts-node: ^10.9.1 - tslib: ^2.4.0 - typescript: ^5.0.4 - unzipit: ^1.4.3 - bin: - aztec-compile: dest/cli.js - languageName: unknown - linkType: soft - "@aztec/noir-contracts.js@workspace:^, @aztec/noir-contracts.js@workspace:noir-contracts.js": version: 0.0.0-use.local resolution: "@aztec/noir-contracts.js@workspace:noir-contracts.js" dependencies: "@aztec/aztec.js": "workspace:^" - "@aztec/noir-compiler": "workspace:^" + "@aztec/builder": "workspace:^" "@jest/globals": ^29.5.0 "@types/jest": ^29.5.0 jest: ^29.5.0 @@ -580,12 +580,12 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/noir-protocol-circuits-types@workspace:noir-protocol-circuits-types" dependencies: + "@aztec/builder": "workspace:^" "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/kv-store": "workspace:^" "@aztec/merkle-tree": "workspace:^" - "@aztec/noir-compiler": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 "@noir-lang/acvm_js": "portal:../../noir/packages/acvm_js" @@ -711,13 +711,13 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/pxe@workspace:pxe" dependencies: + "@aztec/builder": "workspace:^" "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/ethereum": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/key-store": "workspace:^" "@aztec/kv-store": "workspace:^" - "@aztec/noir-compiler": "workspace:^" "@aztec/noir-contracts.js": "workspace:^" "@aztec/noir-protocol-circuits-types": "workspace:^" "@aztec/protocol-contracts": "workspace:^" From 11a4040ee577d14b41a7bd2d8940132ff29efd33 Mon Sep 17 00:00:00 2001 From: benesjan Date: Tue, 23 Apr 2024 12:29:50 +0000 Subject: [PATCH 2/5] aztec-compile -> aztec-builder --- boxes/Dockerfile | 2 +- boxes/Earthfile | 2 +- boxes/boxes/react/package.json | 2 +- boxes/boxes/vanilla/package.json | 2 +- boxes/contract-only/package.json | 2 +- .../contracts/compiling_contracts/how_to_compile_contract.md | 2 +- yarn-project/builder/README.md | 2 +- yarn-project/builder/{aztec-compile-dest => aztec-builder-dest} | 0 yarn-project/builder/package.json | 2 +- yarn-project/builder/src/cli.ts | 2 +- yarn-project/yarn.lock | 2 +- 11 files changed, 10 insertions(+), 10 deletions(-) rename yarn-project/builder/{aztec-compile-dest => aztec-builder-dest} (100%) diff --git a/boxes/Dockerfile b/boxes/Dockerfile index bfd99786b63..6ca01d2f468 100644 --- a/boxes/Dockerfile +++ b/boxes/Dockerfile @@ -13,7 +13,7 @@ COPY --from=noir-projects /usr/src/noir-projects/noir-protocol-circuits/crates/t WORKDIR /usr/src/boxes COPY . . ENV AZTEC_NARGO=/usr/src/noir/noir-repo/target/release/nargo -ENV AZTEC_COMPILE=/usr/src/yarn-project/builder/aztec-compile-dest +ENV AZTEC_BUILDER=/usr/src/yarn-project/builder/aztec-builder-dest RUN yarn RUN npx -y playwright@1.42 install --with-deps ENTRYPOINT ["/bin/sh", "-c"] diff --git a/boxes/Earthfile b/boxes/Earthfile index 7e882db4d9a..d790d1b0da5 100644 --- a/boxes/Earthfile +++ b/boxes/Earthfile @@ -12,7 +12,7 @@ build: WORKDIR /usr/src/boxes COPY . . ENV AZTEC_NARGO=/usr/src/noir/noir-repo/target/release/nargo - ENV AZTEC_COMPILE=/usr/src/yarn-project/builder/aztec-compile-dest + ENV AZTEC_BUILDER=/usr/src/yarn-project/builder/aztec-builder-dest RUN yarn && yarn build RUN npx -y playwright@1.42 install --with-deps ENTRYPOINT ["/bin/sh", "-c"] diff --git a/boxes/boxes/react/package.json b/boxes/boxes/react/package.json index 31619d2ea24..8d121e38a9d 100644 --- a/boxes/boxes/react/package.json +++ b/boxes/boxes/react/package.json @@ -7,7 +7,7 @@ "main": "./dist/index.js", "scripts": { "compile": "cd src/contracts && ${AZTEC_NARGO:-aztec-nargo} compile", - "codegen": "${AZTEC_COMPILE:-aztec-compile} codegen src/contracts/target -o artifacts", + "codegen": "${AZTEC_BUILDER:-aztec-builder} codegen src/contracts/target -o artifacts", "clean": "rm -rf ./dist .tsbuildinfo ./artifacts ./src/contracts/target", "prep": "yarn clean && yarn compile && yarn codegen", "dev": "yarn prep && webpack serve --mode development", diff --git a/boxes/boxes/vanilla/package.json b/boxes/boxes/vanilla/package.json index 92b3ebc7cd2..f2d6ee850ee 100644 --- a/boxes/boxes/vanilla/package.json +++ b/boxes/boxes/vanilla/package.json @@ -6,7 +6,7 @@ "type": "module", "scripts": { "compile": "cd src/contracts && ${AZTEC_NARGO:-aztec-nargo} compile", - "codegen": "${AZTEC_COMPILE:-aztec-compile} codegen src/contracts/target -o artifacts", + "codegen": "${AZTEC_BUILDER:-aztec-builder} codegen src/contracts/target -o artifacts", "clean": "rm -rf ./dest .tsbuildinfo ./artifacts ./src/contracts/target", "prep": "yarn clean && yarn compile && yarn codegen && tsc -b", "dev": "yarn prep && webpack serve --mode development", diff --git a/boxes/contract-only/package.json b/boxes/contract-only/package.json index 13edb7678fd..493f35979f9 100644 --- a/boxes/contract-only/package.json +++ b/boxes/contract-only/package.json @@ -6,7 +6,7 @@ "type": "module", "scripts": { "compile": "cd src && ${AZTEC_NARGO:-aztec-nargo} compile", - "codegen": "${AZTEC_COMPILE:-aztec-compile} codegen target -o artifacts", + "codegen": "${AZTEC_BUILDER:-aztec-builder} codegen target -o artifacts", "clean": "rm -rf ./dest .tsbuildinfo ./artifacts ./target", "prep": "yarn clean && yarn compile && yarn codegen && tsc -b", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --runInBand", diff --git a/docs/docs/developers/contracts/compiling_contracts/how_to_compile_contract.md b/docs/docs/developers/contracts/compiling_contracts/how_to_compile_contract.md index 6f047087f03..3651756328d 100644 --- a/docs/docs/developers/contracts/compiling_contracts/how_to_compile_contract.md +++ b/docs/docs/developers/contracts/compiling_contracts/how_to_compile_contract.md @@ -22,7 +22,7 @@ This will output a JSON [artifact](./artifacts.md) for each contract in the proj :::note This command looks for `Nargo.toml` files by ascending up the parent directories, and will compile the top-most Nargo.toml file it finds. -Eg: if you are in `/hobbies/cool-game/contracts/easter-egg/`, and both `cool-game` and `easter-egg` contain a Nargo.toml file, then `aztec-compile` will be performed on `cool-game/Nargo.toml` and compile the project(s) specified within it. Eg +Eg: if you are in `/hobbies/cool-game/contracts/easter-egg/`, and both `cool-game` and `easter-egg` contain a Nargo.toml file, then `aztec-builder` will be performed on `cool-game/Nargo.toml` and compile the project(s) specified within it. Eg ``` [workspace] members = [ diff --git a/yarn-project/builder/README.md b/yarn-project/builder/README.md index 81e65fef8aa..81434933b22 100644 --- a/yarn-project/builder/README.md +++ b/yarn-project/builder/README.md @@ -17,7 +17,7 @@ yarn add @aztec/builder To run the compiler as a CLI tool, first install the package and then run: ```bash -yarn aztec-compile compile --help +yarn aztec-builder compile --help ``` You can also run the compiler from the [main Aztec CLI](../cli/README.md), which includes several other features for interacting with the Aztec Network: diff --git a/yarn-project/builder/aztec-compile-dest b/yarn-project/builder/aztec-builder-dest similarity index 100% rename from yarn-project/builder/aztec-compile-dest rename to yarn-project/builder/aztec-builder-dest diff --git a/yarn-project/builder/package.json b/yarn-project/builder/package.json index 79170d9d165..5f87dd34488 100644 --- a/yarn-project/builder/package.json +++ b/yarn-project/builder/package.json @@ -14,7 +14,7 @@ "tsconfig": "./tsconfig.json" }, "bin": { - "aztec-compile": "dest/cli.js" + "aztec-builder": "dest/cli.js" }, "scripts": { "build": "yarn clean && tsc -b", diff --git a/yarn-project/builder/src/cli.ts b/yarn-project/builder/src/cli.ts index 931512a63d5..a8d2faf4d6a 100644 --- a/yarn-project/builder/src/cli.ts +++ b/yarn-project/builder/src/cli.ts @@ -25,7 +25,7 @@ const main = async () => { .default(`http://${LOCALHOST}:8080`) .makeOptionMandatory(true); - program.name('aztec-compile'); + program.name('aztec-builder'); program .command('codegen') .argument('', 'Path to the Noir ABI or project dir.') diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index 71bc7c1bfc0..12ef01aca7c 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -271,7 +271,7 @@ __metadata: typescript: ^5.0.4 unzipit: ^1.4.3 bin: - aztec-compile: dest/cli.js + aztec-builder: dest/cli.js languageName: unknown linkType: soft From 320ec55e477e25341b1f49f62d5d49d086fdb2b7 Mon Sep 17 00:00:00 2001 From: benesjan Date: Tue, 23 Apr 2024 13:29:40 +0000 Subject: [PATCH 3/5] skipping e2e_slow_tree --- yarn-project/end-to-end/src/e2e_slow_tree.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn-project/end-to-end/src/e2e_slow_tree.test.ts b/yarn-project/end-to-end/src/e2e_slow_tree.test.ts index b1f583e9e54..e853e125f65 100644 --- a/yarn-project/end-to-end/src/e2e_slow_tree.test.ts +++ b/yarn-project/end-to-end/src/e2e_slow_tree.test.ts @@ -6,7 +6,7 @@ import { SlowTreeContract } from '@aztec/noir-contracts.js/SlowTree'; import { setup } from './fixtures/utils.js'; -describe('e2e_slow_tree', () => { +describe.skip('e2e_slow_tree', () => { let logger: DebugLogger; let wallet: Wallet; let teardown: () => Promise; From eba49f4d53e98bed11c69c87cc23e8aae803d079 Mon Sep 17 00:00:00 2001 From: benesjan Date: Tue, 23 Apr 2024 13:48:52 +0000 Subject: [PATCH 4/5] fix --- .../contracts/compiling_contracts/how_to_compile_contract.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/developers/contracts/compiling_contracts/how_to_compile_contract.md b/docs/docs/developers/contracts/compiling_contracts/how_to_compile_contract.md index 3651756328d..c1fdb70014c 100644 --- a/docs/docs/developers/contracts/compiling_contracts/how_to_compile_contract.md +++ b/docs/docs/developers/contracts/compiling_contracts/how_to_compile_contract.md @@ -22,7 +22,7 @@ This will output a JSON [artifact](./artifacts.md) for each contract in the proj :::note This command looks for `Nargo.toml` files by ascending up the parent directories, and will compile the top-most Nargo.toml file it finds. -Eg: if you are in `/hobbies/cool-game/contracts/easter-egg/`, and both `cool-game` and `easter-egg` contain a Nargo.toml file, then `aztec-builder` will be performed on `cool-game/Nargo.toml` and compile the project(s) specified within it. Eg +Eg: if you are in `/hobbies/cool-game/contracts/easter-egg/`, and both `cool-game` and `easter-egg` contain a Nargo.toml file, then `aztec-nargo compile` will be performed on `cool-game/Nargo.toml` and compile the project(s) specified within it. Eg ``` [workspace] members = [ From d16933b218396d89c6c6bbcdaf5c15ae65c48b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bene=C5=A1?= Date: Tue, 23 Apr 2024 16:15:24 +0200 Subject: [PATCH 5/5] Update yarn-project/builder/README.md Co-authored-by: esau <152162806+sklppy88@users.noreply.github.com> --- yarn-project/builder/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn-project/builder/README.md b/yarn-project/builder/README.md index 81434933b22..3b2a1729676 100644 --- a/yarn-project/builder/README.md +++ b/yarn-project/builder/README.md @@ -2,7 +2,7 @@ The Aztec.nr compiler compiles Aztec.nr contracts using nargo and outputs Aztec formatted contract ABIs. The compiler can also generate typescript classes for each contract, as well as Aztec.nr interfaces for calling external functions. -it can also be used to update aztec project dependencies. +It can also be used to update aztec project dependencies. ## Installation