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
Problem
I tried to specify a keyword within Cargo.toml that contained a space. Running cargo publish --dry-run showed that the package was valid, but submitting it to crates.io failed with an API error.
keywords = ["foo", "foo bar"]
I appreciate that you might not want to tie implementation details in crates.io to cargo publish in case this theoretically could be supported in other package repository implementations, but I thought I would report this anyway. If you decide that this is a bug, I'm more than happy to submit a pull request for it.
Steps
Create a new crate
Add a keyword with a space in it, such as keywords = ["foo", "foo bar"]
Run cargo publish --dry-run: Does not display any errors.
Publish crate using cargo publish: Returns an API error.
Possible Solution(s)
Display an error after a dry run if there is a space in a keyword.
Notes
The output from cargo publish:
> cargo publish
Updating crates.io index
Packaging foo v0.1.0 (D:\Source\github\patriksvensson\foo)
Verifying foo v0.1.0 (D:\Source\github\patriksvensson\foo)
Finished dev [unoptimized + debuginfo] target(s) in 1.06s
Uploading foo v0.1.0 (D:\Source\github\patriksvensson\foo)
error: api errors (status 200 OK): invalid upload request: invalid value: string "foo bar", expected a valid keyword specifier at line 1 column 555
The text was updated successfully, but these errors were encountered:
3044: libraries/tickv: Remove space from keyword r=hudson-ayers a=alistair23
### Pull Request Overview
According to rust-lang/cargo#8482 we can't
have spaces or slashes in the keywords.
Signed-off-by: Alistair Francis <[email protected]>
### Testing Strategy
`cargo publish`
### TODO or Help Wanted
### Documentation Updated
- [X] Updated the relevant files in `/docs`, or no updates are required.
### Formatting
- [X] Ran `make prepush`.
Co-authored-by: Alistair Francis <[email protected]>
Problem
I tried to specify a keyword within
Cargo.toml
that contained a space. Runningcargo publish --dry-run
showed that the package was valid, but submitting it to crates.io failed with an API error.I appreciate that you might not want to tie implementation details in
crates.io
tocargo publish
in case this theoretically could be supported in other package repository implementations, but I thought I would report this anyway. If you decide that this is a bug, I'm more than happy to submit a pull request for it.Steps
keywords = ["foo", "foo bar"]
cargo publish --dry-run
: Does not display any errors.cargo publish
: Returns an API error.Possible Solution(s)
Display an error after a dry run if there is a space in a keyword.
Notes
The output from
cargo publish
:The text was updated successfully, but these errors were encountered: