workspace,scripts: mark workspace-only crates publish = false and enforce it when publishing - #15115
avi-starkware wants to merge 1 commit into
Conversation
|
Artifacts upload workflows: |
…orce it when publishing Only the 16 crates that carry a version in the workspace manifest are ever published; the other 99 members are referenced by path alone. Marking them `publish = false` states that explicitly, makes `cargo publish` refuse them, and turns their versionless path dependencies into private-crate paths that cargo-deny's `allow-wildcard-paths` (enabled in the next commit) can exempt instead of reporting as wildcards. starknet_proof_verifier keeps its version and stays reported: it depends on a git dependency with no crates.io version, so it cannot be published until that is resolved. publish_crates.py now fails early if the publish order contains a crate marked `publish = false`, and follows only normal and build edges when computing that order: `cargo tree`'s default edges include the root crate's dev-dependencies, which pulled workspace-only test helpers into the list of crates to publish. A workspace test keeps the `publish = false` flag aligned with the version-based publishing rule. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
d89e582 to
7d9a8fa
Compare
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit 7d9a8fa. Bugbot is set up for automated code reviews on this repo. Configure here. |
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware reviewed 1 file.
Reviewable status: 1 of 101 files reviewed, all discussions resolved (waiting on asaf-sw).
einat-starkware
left a comment
There was a problem hiding this comment.
@einat-starkware reviewed 101 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on asaf-sw).
Only the 16 crates with a
versionin the root workspace manifest are ever published; the other 99 members (97 path-only workspace deps plustoml_test_utilsandworkspace_tests) are referenced by path alone. This PR states that explicitly withpublish = false, which makescargo publishrefuse them and lets cargo-deny'sallow-wildcard-pathstreat their versionless path dependencies as intended rather than as wildcards (next PR).scripts/publish_crates.pypublish = falsecrate (viacargo metadata; no new Python dependency).normal,buildedges incargo tree. Its default edges include the root crate's dev-dependencies, so publishingapollo_configwould have attemptedapollo_test_utils, andblockifierwould have pulled inblockifier_test_utils.Test:
workspace_tests::test_members_are_unpublishable_iff_they_are_not_for_publishassertspublish = false⟺ not in the version-derived publish set, so the flag and theversionrule cannot drift apart (verified to fail when a flag is removed).Verified:
cargo metadata→ 99 restricted / 16 unrestricted, and the 16 are exactly the versioned set;taplo format --checkclean;cargo check --workspace --all-targetsgreen; publish orders forblockifier,starknet_api,apollo_starknet_os_program,blockifier_test_utilsare all-publishable with no dev-dep leakage.Deliberately not touched:
starknet_proof_verifieris versioned (publishable) but depends on the git dependencyprivacy-circuit-verify-v2with no crates.io version, so it cannot be published today. cargo-deny keeps reporting it as one wildcard finding; that is accurate and intentionally left visible.🤖 Generated with Claude Code