Skip to content
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

Typos in badge names aren't caught by cargo publish --dry-run #7979

Closed
daboross opened this issue Mar 9, 2020 · 1 comment
Closed

Typos in badge names aren't caught by cargo publish --dry-run #7979

daboross opened this issue Mar 9, 2020 · 1 comment
Labels
C-bug Category: bug

Comments

@daboross
Copy link
Contributor

daboross commented Mar 9, 2020

Problem

If I make a typo in the badges portion of my cargo library, there's no warning on compile nor on a dry-run publish, and I only get to see that something's wrong after the publish succeeds.

Steps

  1. Create a new cargo library.
  2. Add to Cargo.toml:
[badges]
is-it-mantained-issue-resolution = { repository = "daboross/fern" }
  1. Try to catch publish errors using cargo publish --dry-run (no errors are displayed)
  2. Publish the crate on crates.io using cargo publish (this displays a warning about is-it-mantained-issue-resolution being ignored as a badge)

Possible Solution(s)

I'd expect this should be possible by pinging the crates.io servers on a dry-run upload to check whether there are any invalid attributes. I expect cargo publish --dry-run to do everything that cargo publish does short of actually publishing it, so if there's a step separate from uploading that cargo publish does to display errors about ignored badges, maybe it could do that?

Notes

Output of cargo version: cargo 1.43.0-nightly (e57bd0299 2020-02-21)

@daboross daboross added the C-bug Category: bug label Mar 9, 2020
@ehuss
Copy link
Contributor

ehuss commented Mar 9, 2020

Eventually we would like to have a new publish API that supports this. Since this is already reported in #3576, closing as a duplicate.

@ehuss ehuss closed this as completed Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants