Closed as not planned
Description
See rust-lang/crates.io#1395 for original discussion. tl;dr: crates.io validation is working as desired and Cargo needs to be stricter.
Cargo's feature name validation is inconsistent with crates.io and should reject feature names that are not "mostly rust identifiers." Currently Cargo will accept feature names that are rejected by crates.io during cargo publish
and cargo publish --dry-run
doesn't detect the issue.
$ cargo publish
...
Uploading uom v0.18.0 (file:///S:/uom)
error: api errors: invalid upload request: invalid value: string "1.20.0", expected a valid feature name
containing only letters, numbers, hyphens, or underscores at line 1 column 931
Cargo should reject the feature name 1.20.0
prior to attempting to publish.