Skip to content

cargo publish can fail after --dry-run succeeded #11466

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

Closed
ijackson opened this issue Dec 7, 2022 · 2 comments
Closed

cargo publish can fail after --dry-run succeeded #11466

ijackson opened this issue Dec 7, 2022 · 2 comments
Labels
A-interacts-with-crates.io Area: interaction with registries C-bug Category: bug Command-publish

Comments

@ijackson
Copy link
Contributor

ijackson commented Dec 7, 2022

Problem

In my case, I failed to write a description in my Cargo.toml. This caused crates.io to reject my upload.

Steps

  1. Make a package with no description
  2. cargo publish --dry-run, observe success
  3. cargo publish, observe failure

Possible Solution(s)

There are many reasons things might go wrong, and the local cargo doesn't know the policy of the remote site. I think the solution has to be:

  • cargo publish --dry-run should actually send the package to the repository, to an endpoint which checks rather than ingests
  • cargo publish --dry-run --offline should not do this.

Notes

No response

Version

cargo 1.65.0-beta.1 (082503982 2022-09-13)
release: 1.65.0-beta.1
commit-hash: 082503982ea0fb7a8fd72210427d43a2e2128a63
commit-date: 2022-09-13
host: x86_64-unknown-linux-gnu
libgit2: 1.5.0 (sys:0.15.0 vendored)
libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:OpenSSL/1.1.1q)
os: Debian 10 (buster) [64-bit]
@ijackson ijackson added the C-bug Category: bug label Dec 7, 2022
@weihanglo
Copy link
Member

@weihanglo weihanglo added Command-publish A-interacts-with-crates.io Area: interaction with registries labels Dec 7, 2022
@weihanglo
Copy link
Member

I am going to close this in favour of #5941, as more discussions happened there. If you think they are inherently different, we can re-open this.

@weihanglo weihanglo closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-interacts-with-crates.io Area: interaction with registries C-bug Category: bug Command-publish
Projects
None yet
Development

No branches or pull requests

2 participants