cargo publish --dry-run
should report unsupported category slugs
#14184
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-triage
Status: This issue is waiting on initial triage.
Problem
When running
cargo publish --dry-run
on a crate with a category unsupported on crates.io, the dry run succeeds, but when running the realcargo publish
, this now triggers a hard error (since rust-lang/crates.io#8930):It would be good if the dry run could detect that.
Proposed Solution
Cargo could contact an endpoint on the registry (be it crates.io or wherever the package is being published) to fetch the list of existing categories, and match that locally against the categories defined in the Cargo.toml.
Apart from the rare TOCTOU when the list of categories changes (does it ever change?), this should be sufficient to make the dry run more representative of the real run.
Notes
No response
The text was updated successfully, but these errors were encountered: