Repository navigation
Commit c1b606f
fix(release): publish the Rust crates from staged copies, not the checkout (#25686)
## Problem
Every nightly release since Oct 16 (#25362) has failed in the release
stage, after ipc-runtime is published ([latest
log](http://ci.aztec-labs.com/1792728566760151)):
```
+ ipc-codegen/bootstrap.sh release
ERROR: Noticed changes to rebuild patterns during CI run: ipc-runtime/rust/Cargo.toml
```
`ipc-runtime`'s `release_crate` wrote the release version into the
tracked `rust/Cargo.toml` and copied the C++ sources into `rust/cpp`,
all in place. `ipc-codegen` (`^ipc-runtime/rust/`) and
`barretenberg/rust` (`^ipc-runtime/(rust|cpp)/`) both hash those paths,
and in CI a content hash over modified files is a hard error.
`barretenberg/rust`'s release also rewrote its own workspace and
`barretenberg-rs` Cargo.toml in place, so it would have hit the same
error once ipc-codegen got past it.
## Fix
Publish both crates from staged copies in a temp dir, so the checkout is
never modified during a release:
- **ipc-runtime:** a new `stage_crate <version> <dir>` copies
Cargo.toml, build.rs, `src/` and the C++ sources into
`<dir>/ipc-runtime/rust` and sets the version there. `release_crate`
publishes from that copy. Its verify build now runs without a `../cpp`
sibling, so it checks that the crate is self-contained.
- **barretenberg/rust:** stages ipc-runtime with `stage_crate` and
copies its own workspace (without `target/`) beside it. The
`../../../ipc-runtime/rust` path dependency then resolves to the staged
ipc-runtime at the release version. Both version edits are made in the
copy, and it publishes from there.
The published crates are the same as before. The other release steps
don't touch tracked files: noir's version edit goes to
`noir/packages/*/package.json`, which is neither tracked nor hashed.
## Testing (local)
- `cargo package` (with verify) on the staged ipc-runtime: compiles on
its own.
- `DRY_RUN=1 REF_NAME=v7.0.0-test.1 barretenberg/rust/bootstrap.sh
release`: runs to the publish step, and `git status` stays clean.
- `cargo package -p barretenberg-rs` on a staged workspace at
`7.0.0-nightly.20261023` (already on crates.io): packages, and the
manifest pins `ipc-runtime = "=7.0.0-nightly.20261023"`, as the old
in-place edit did.
Not run: a real `cargo publish`, and barretenberg-rs's full verify
build, which needs the matching GitHub release. The next nightly will
run both.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_016kciXnp1Yc2jptqABHLg2w
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 8bf338b commit c1b606f
2 files changed
Lines changed: 33 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | 77 | | |
81 | 78 | | |
82 | 79 | | |
83 | 80 | | |
84 | 81 | | |
85 | 82 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | 83 | | |
91 | 84 | | |
92 | 85 | | |
93 | 86 | | |
94 | 87 | | |
95 | 88 | | |
96 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
103 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
104 | 111 | | |
105 | 112 | | |
106 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
74 | 86 | | |
75 | 87 | | |
76 | 88 | | |
| |||
81 | 93 | | |
82 | 94 | | |
83 | 95 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 96 | + | |
| 97 | + | |
91 | 98 | | |
92 | | - | |
93 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
94 | 102 | | |
95 | 103 | | |
96 | 104 | | |
| |||
0 commit comments