-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The "unused manifest key" warning doesn't print or halt the publishing with cargo publish
#7380
Comments
I tried to reproduce your issue, but didn't get the same result with $ cargo --version
cargo 1.41.0-nightly (750cb1482 2019-11-23)
$ cargo new issue-7380
Created binary (application) `issue-7380` package
$ cd issue-7380
$ cargo build
Compiling issue-7380 v0.1.0 (/Users/stefan/Development/cargo-issues/issue-7380)
Finished dev [unoptimized + debuginfo] target(s) in 3.28s
$ cargo package --allow-dirty
warning: manifest has no description, license, license-file, documentation, homepage or repository.
See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
Packaging issue-7380 v0.1.0 (/Users/stefan/Development/cargo-issues/issue-7380)
Verifying issue-7380 v0.1.0 (/Users/stefan/Development/cargo-issues/issue-7380)
Compiling issue-7380 v0.1.0 (/Users/stefan/Development/cargo-issues/issue-7380/target/package/issue-7380-0.1.0)
Finished dev [unoptimized + debuginfo] target(s) in 0.53s
$ cargo publish --allow-dirty --dry-run
Updating crates.io index
warning: manifest has no description, license, license-file, documentation, homepage or repository.
See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
Packaging issue-7380 v0.1.0 (/Users/stefan/Development/cargo-issues/issue-7380)
Verifying issue-7380 v0.1.0 (/Users/stefan/Development/cargo-issues/issue-7380)
Compiling issue-7380 v0.1.0 (/Users/stefan/Development/cargo-issues/issue-7380/target/package/issue-7380-0.1.0)
Finished dev [unoptimized + debuginfo] target(s) in 1.00s
Uploading issue-7380 v0.1.0 (/Users/stefan/Development/cargo-issues/issue-7380)
warning: aborting upload due to dry run
There is still the point to stop the publishing process on (any?) warnings. I think that could be discussed what the desired behavior is. |
was trying to fix this issue and have a proposed solution here. It denies a incomplete manifest during publishing, but it can be overwritten with |
We'd likely want to do this on every invocation or on every lint invocation and be subject to #12235, rather than fail during publish
|
Normally if you have a manifest key that cargo doesn't understand many of the commands will print a warning
However, if you use
cargo publish
not only does the accidental key not halt the publishing process without an override flag (as one might expect, similar to how you can't publish with a dirty git state without a flag), but it doesn't even directly print the warning about a bad key. Instead I got the warning about "no documentation, homepage or repository."(Was posted as rust-lang/rust#64476 and then I was told to repost here because apparently there's a gap in the permissions among triage folks, which has already also been reported elsewhere so we can have that solved too soon enough)
The text was updated successfully, but these errors were encountered: