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
{{ message }}
Repository navigation
The "unused manifest key" warning doesn't print or halt the publishing with cargo publish #7380
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."
D:\dev\cargo-gba>cargo publish
Updating crates.io index
warning: manifest has no documentation, homepage or repository.
See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
(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)
Activity
stefanhoelzl commentedon Dec 7, 2019
I tried to reproduce your issue, but didn't get the same result with
cargo build$ 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 runcargo builddoesn't raise any warnings.cargo packageandcargo publishraise the same warnings.There is still the point to stop the publishing process on (any?) warnings. I think that could be discussed what the desired behavior is.
stefanhoelzl commentedon Dec 7, 2019
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
--allow-incomplete-manifestepage commentedon Nov 2, 2023
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