fix(l1): make ethrex-rlp bench dev-deps path-only so the first crates.io publish succeeds#6897
Conversation
…h succeeds ethrex-rlp is the first crate published to crates.io, but its bench dev-dependencies on ethrex-common and ethrex-trie became versioned once version = "17.0.0" was added to the [workspace.dependencies] entries. cargo publish then required ethrex-common 17.0.0 from the registry before it existed (ethrex-rlp publishes before them), failing with "no matching package named `ethrex-common` found". Declare those bench dev-deps as path-only (no version) so they are stripped from the published manifest, restoring the pre-publishing behavior. Verified with `cargo publish --dry-run` for the three leaf crates (ethrex-rlp, ethrex-crypto, ethrex-sdk-contract-utils).
🤖 Kimi Code ReviewThe change is correct and solves a legitimate workspace publishing ordering issue. Analysis:
Minor Suggestion: The comment on lines 18-20 is excellent and explains the "why" clearly. Consider also adding a brief note that these are only used in No issues found - this is the idiomatic fix for this scenario. Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt |
🤖 Claude Code ReviewHere is my review of PR #6897: Code Review:
|
There was a problem hiding this comment.
Pull request overview
This PR fixes the crates.io publishing order issue for the ethrex-rlp crate by ensuring its bench-only dev-dependencies on sibling workspace crates don’t get published as versioned dependencies that must already exist on crates.io.
Changes:
- Converted
ethrex-rlp’s dev-dependencies onethrex-commonandethrex-triefromworkspace = true(versioned) to path-only dependencies. - Added an in-file comment explaining why these dev-dependencies must remain path-only to allow the first publish in the sequence to succeed.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🤖 Codex Code ReviewNo findings. This is a manifest-only change in Residual verification gap: I could not complete Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
…e in CI REVERT BEFORE MERGE. Temporarily: - adds a `push` trigger for this branch so the workflow runs in CI on each push, - forces dry-run for every non-release event (the push trigger never publishes), - upgrades the dry-run to `cargo publish --dry-run` (packaging + index resolution + verify build), tolerating only the expected "no matching package" error for siblings not yet on crates.io. Validates the workflow mechanics, the crates-release-prod environment, and the leaf crates' full packaging + verify-build on a clean CI runner.
… validate in CI" This reverts commit 9bd7349.
…t dep cycles The workflow_dispatch dry-run used `cargo package --list`, which only lists tarball files and never resolves against the crates.io index -- so it could not catch the unpublishable-dependency bug this PR fixes. - Replace the dry-run with `cargo publish --dry-run` (packaging + index resolution + verify build), tolerating only the expected "no matching package" for siblings not yet published during a chain dry-run. - Add a guard step (runs for both dry-run and real publish) that fails fast if the edges `cargo publish` keeps form a dependency cycle among the published crates -- exactly the bug class this PR fixes (a versioned dev/build-dep pointing at a crate published later). Deterministic; the dry-run alone can't distinguish it from the expected chain ordering, so the guard is what catches it.
Remove the embedded Python step (keeps the workflow free of inline scripts). The workflow_dispatch dry-run still uses `cargo publish --dry-run` (packaging + index resolution + verify build) instead of the previous `cargo package --list`, so on-demand dry-runs are meaningful; it tolerates only the expected "no matching package" for siblings not yet published during a chain dry-run.
Add a `run-name` that appends " (dry run)" when triggered via workflow_dispatch with the dry_run input, so the Actions run list clearly distinguishes a dry run from a real publish.
Motivation
The manual
Publish crates to crates.iorun failed on the very first crate:ethrex-rlpis published first, but its bench dev-dependencies onethrex-commonandethrex-triebecame versioned whenversion = "17.0.0"was added to the[workspace.dependencies]entries (via.workspace = true).cargo publishkeeps versioned dev-deps in the published manifest and resolves them against crates.io — but those crates aren't published yet (they come later in the order), so packagingethrex-rlpfails.Description
Declare
ethrex-rlp's bench dev-deps as path-only (no version):Path-only dev-deps are stripped from the published manifest (the pre-publishing behavior), so
cargo publishno longer requires them from the index. Benches still build locally via the path.This was the only affected crate:
ethrex-l2-rpc's dev-dep onethrex-rpcandethrex-sdk's build-dep onethrex-sdk-contract-utilsare forward edges (the dep publishes before the consumer), so they resolve in order.Validation
cargo publish --dry-runnow succeeds for all three leaf crates — each reaches "Uploading … aborting upload due to dry run":ethrex-rlp,ethrex-crypto,ethrex-sdk-contract-utils(The dependents can't be dry-run'd locally until their deps are on crates.io, but the topological order is unchanged and no other versioned sibling dev/build-deps point forward.)
How to test
After merge, re-run the Publish crates to crates.io workflow (dry-run first, then real). The first crate
ethrex-rlpwill package and upload instead of erroring.Checklist
STORE_SCHEMA_VERSION(crates/storage/lib.rs) if the PR includes breaking changes to theStorerequiring a re-sync. — N/A.