cargo publish --dry-run
doesn't fail on invalid keywords
#14426
Labels
cargo publish --dry-run
doesn't fail on invalid keywords
#14426
Problem
First of all, thanks for maintaining
cargo
! I'm a very happy user.I've noticed a case where
cargo publish --dry-run
completes successfully, butcargo publish
will fail (forcrates.io
, and likely for other indices running the same stack).In particular: if the
keywords
field contains an entry longer than 20 characters,crates.io
will reject it. However,--dry-run
reports no issue with such a keyword.For example, the following
keywords
set will cause a publish failure:...because the last member (
static-site-generator
) is 21 characters long.The error message returned by
crates.io
suggests that a 20 character long keyword would also fail:Steps
keywords
member that's longer than 20 charscargo publish --dry-run
and observe that it succeedscargo publish
and observe that it failsPossible Solution(s)
Two possible solutions come to mind:
cargo publish --dry-run
's behavior so that these overlength keywords cause a failure with an appropriate error message. This would potentially cause overly eager error messages against other indices (i.e. other thancrates.io
), if those indices support longer keywords.crates.io
. This will prevent unexpected breakage against other indices, while still providing more of a heads up to users.There are probably other solutions, however!
Notes
No other notes.
Version
The text was updated successfully, but these errors were encountered: