-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed as not planned
Labels
A-featuresArea: features — conditional compilationArea: features — conditional compilationA-interacts-with-crates.ioArea: interaction with registriesArea: interaction with registriesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-publish
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.
Metadata
Metadata
Assignees
Labels
A-featuresArea: features — conditional compilationArea: features — conditional compilationA-interacts-with-crates.ioArea: interaction with registriesArea: interaction with registriesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-publish