|
| 1 | +--- |
| 2 | +name: noir-sync-update |
| 3 | +description: Perform necessary follow-on updates as a result of updating the noir git submodule. |
| 4 | +--- |
| 5 | + |
| 6 | +# Noir Sync Update |
| 7 | + |
| 8 | +## Workflow |
| 9 | + |
| 10 | +Copy this checklist and track progress: |
| 11 | + |
| 12 | +``` |
| 13 | +Noir Sync Update Progress: |
| 14 | +- [ ] Step 1: Ensure that the new submodule commit has been pulled. |
| 15 | +- [ ] Step 2: Update the `Cargo.lock` file in `avm-transpiler`. |
| 16 | +- [ ] Step 3: Update the `yarn.lock` file in `yarn-project`. |
| 17 | +- [ ] Step 4: Format `noir-projects`. |
| 18 | +- [ ] Step 5: Check `noir-projects` still compiles. |
| 19 | +``` |
| 20 | + |
| 21 | +After each step, commit the results. |
| 22 | + |
| 23 | +## Critical Verification Rules |
| 24 | + |
| 25 | +**ALWAYS verify file changes with `git status` after any modification step before marking it complete.** Command output showing "updating" does not guarantee the file was written to disk. |
| 26 | + |
| 27 | +### Step 1: Ensure that the new submodule commit has been pulled |
| 28 | + |
| 29 | +Run `./bootstrap.sh` in `noir` to ensure that the new submodule commit has been pulled. |
| 30 | + |
| 31 | +This shouldn't update any files such that a commit is necessary. |
| 32 | + |
| 33 | +### Step 2: Update `Cargo.lock` in `avm-transpiler` |
| 34 | + |
| 35 | +**Before updating**, determine the expected noir version: |
| 36 | +1. Read `noir/noir-repo/.release-please-manifest.json` to find the expected version (e.g., `1.0.0-beta.18`) |
| 37 | +2. Check the current version in `avm-transpiler/Cargo.lock` by searching for `acir` or similar noir packages |
| 38 | + |
| 39 | +**To update the lock file**, run `cargo update` in `avm-transpiler` with **only noir-repo packages**: |
| 40 | + |
| 41 | +```bash |
| 42 | +cd avm-transpiler |
| 43 | +cargo update -p acir -p acir_field -p acvm -p acvm_blackbox_solver -p bn254_blackbox_solver -p brillig -p brillig_vm -p fm -p iter-extended -p noirc_abi -p noirc_arena -p noirc_artifacts -p noirc_errors -p noirc_evaluator -p noirc_frontend -p noirc_printable_type -p noirc_span |
| 44 | +``` |
| 45 | + |
| 46 | +**IMPORTANT:** Do NOT use `cargo update` without `-p` flags—this will update ALL dependencies, not just noir-repo packages. |
| 47 | + |
| 48 | +**After updating**, verify: |
| 49 | +1. Run `git status avm-transpiler/` to confirm `Cargo.lock` was modified |
| 50 | +2. Run `cargo check` to ensure it still builds |
| 51 | +3. Grep `Cargo.lock` for `acir` to verify the version matches the expected version from `.release-please-manifest.json` |
| 52 | + |
| 53 | +It's possible that changes in dependencies result in `avm-transpiler` no longer building. |
| 54 | + - If transient dependency mismatches mean changes to the dependency tree are necessary, then the `Cargo.lock` file in `avm-transpiler` should be modified. **DO NOT MODIFY `noir/noir-repo`**. |
| 55 | + - If updates are necessary due to changes in exports from `noir/noir-repo` packages, then perform the necessary updates to import statements, etc. |
| 56 | + |
| 57 | +### Step 3: Update `yarn.lock` in `yarn-project` |
| 58 | + |
| 59 | +Run `yarn install` in `yarn-project` to update the `yarn.lock` file. |
| 60 | + |
| 61 | +**After running**, verify with `git status yarn-project/yarn.lock` that the file was modified before committing. |
| 62 | + |
| 63 | +### Step 4: Format `noir-projects` |
| 64 | + |
| 65 | +Run `./bootstrap.sh format` in `noir-projects`. |
| 66 | + |
| 67 | +This is necessary as the updates to the noir compiler may result in the formatter handling the same code differently. |
| 68 | + |
| 69 | +Failing to run the formatter will result in a CI failure. |
| 70 | + |
| 71 | +**After running**, check `git status noir-projects/` for any formatting changes that need to be committed. |
| 72 | + |
| 73 | +### Step 5: Check `noir-projects` still compiles |
| 74 | + |
| 75 | +Run `./bootstrap.sh` in `noir-projects`. |
| 76 | + |
| 77 | +As a sanity check, we want to ensure that `noir-projects` still compiles after the update. |
0 commit comments