Closed
Description
Problem
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 tocrates.io
and checking for all possible obstacles. - Maybe just including the entire list in https://doc.rust-lang.org/cargo/reference/manifest.html instead of just linking it. Or at least making
crates.io/category_slugs
part an actual, clickable link there.
Notes
Output of cargo version
:
cargo 1.37.0-nightly (545f35425 2019-05-23)