Skip to content

workspace,scripts: mark workspace-only crates publish = false and enforce it when publishing - #15115

Open
avi-starkware wants to merge 1 commit into
main-v0.14.4from
avi/deps/00a-mark-unpublished-crates
Open

avi-starkware wants to merge 1 commit into
main-v0.14.4from
avi/deps/00a-mark-unpublished-crates

Conversation

@avi-starkware

@avi-starkware avi-starkware commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Only the 16 crates with a version in the root workspace manifest are ever published; the other 99 members (97 path-only workspace deps plus toml_test_utils and workspace_tests) are referenced by path alone. This PR states that explicitly with publish = false, which makes cargo publish refuse them and lets cargo-deny's allow-wildcard-paths treat their versionless path dependencies as intended rather than as wildcards (next PR).

scripts/publish_crates.py

  • Fails early if the publish order contains a publish = false crate (via cargo metadata; no new Python dependency).
  • Follows only normal,build edges in cargo tree. Its default edges include the root crate's dev-dependencies, so publishing apollo_config would have attempted apollo_test_utils, and blockifier would have pulled in blockifier_test_utils.

Test: workspace_tests::test_members_are_unpublishable_iff_they_are_not_for_publish asserts publish = false ⟺ not in the version-derived publish set, so the flag and the version rule 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 --check clean; cargo check --workspace --all-targets green; publish orders for blockifier, starknet_api, apollo_starknet_os_program, blockifier_test_utils are all-publishable with no dev-dep leakage.

Deliberately not touched: starknet_proof_verifier is versioned (publishable) but depends on the git dependency privacy-circuit-verify-v2 with 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

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

…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>
@cursor

cursor Bot commented Sep 14, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Manifest and tooling-only changes; no runtime or published-crate behavior changes beyond explicit publish restrictions.

Overview
Marks 99 workspace-only members (sequencer internals, test helpers, CLIs, etc.) with publish = false so cargo publish rejects them and tooling can treat them as private. The 16 crates.io-bound packages (those with a version in the root manifest) are unchanged and remain publishable.

scripts/publish_crates.py now builds the dependency order from normal,build edges only, so dev-only crates like apollo_test_utils / blockifier_test_utils are not pulled into publish runs. It also reads cargo metadata to assert the publish chain contains no publish = false members before attempting uploads.

workspace_tests adds test_members_are_unpublishable_iff_they_are_not_for_publish, keeping publish = false in sync with the existing “version iff for publish” rule, with a short doc cross-link in the version test.

Reviewed by Cursor Bugbot for commit 7d9a8fa. Bugbot is set up for automated code reviews on this repo. Configure here.

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dorimedini-starkware reviewed 1 file.
Reviewable status: 1 of 101 files reviewed, all discussions resolved (waiting on asaf-sw).

@einat-starkware einat-starkware left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@einat-starkware reviewed 101 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on asaf-sw).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants