You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package.categories field in Cargo.toml is hard to get right on the first attempt.
Steps
Start a new project: cargo new --lib somelib
Do the code
Fill in license, README and discoverability-related Cargo.toml fields
cargo publish --dry-run
cargo publish. warning: the following are not valid category slugs and were ignored: testing.
Be annoyed that the flawed version got published, but it's too petty to yank or bump-and-reupload; so the discoverability penalty of not having the category will persist for long (because of subsequent versions of this mini-library may never be needed).
Check the resulting crates.io page and discover that readme = "README.md" is also missed.
Possible Solution(s)
More comments in template Cargo.toml for libraries. In particular, https://crates.io/category_slugs link is hard to find. You need to fail the quest to get it from the "game over screen" (cargo warning that crate is published, but category ignored).
Error instead of warning if category is wrong
Real --dry-run. Actually connecting to crates.io and checking for all possible obstacles.
I'm going to close this for now as the requested enhancements already have issues or are already well known, or not something in Cargo's control. We would definitely like to make the publishing process smoother, though!
Problem
package.categories
field in Cargo.toml is hard to get right on the first attempt.Steps
cargo new --lib somelib
cargo publish --dry-run
cargo publish
.warning: the following are not valid category slugs and were ignored: testing.
readme = "README.md"
is also missed.Possible Solution(s)
Cargo.toml
for libraries. In particular,https://crates.io/category_slugs
link is hard to find. You need to fail the quest to get it from the "game over screen" (cargo warning that crate is published, but category ignored).--dry-run
. Actually connecting tocrates.io
and checking for all possible obstacles.crates.io/category_slugs
part an actual, clickable link there.Notes
Output of
cargo version
:The text was updated successfully, but these errors were encountered: