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

Bundle errors when cargo publish fails #3054

Open
mugoh opened this issue Nov 16, 2020 · 1 comment
Open

Bundle errors when cargo publish fails #3054

mugoh opened this issue Nov 16, 2020 · 1 comment
Labels
A-backend ⚙️ C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works

Comments

@mugoh
Copy link
Contributor

mugoh commented Nov 16, 2020

Describe the problem you are trying to solve
I'm trying to publish a crate by running cargo publish. I verified there were no errors first by running the recommended cargo publish --dry-run. I forgot to add some some publication metadata on the Cargo.toml file and later realised I had misspelled some fields, or mistakenly assigned a wrong field format e.g Assigning a non-url item to the description field.

Cargo specifies each of the errors descriptively when the build fails.

Describe the solution you'd like
The cause of the error in the metadata is well specified. But for each failed upload, cargo shows one error. If one corrects that particular cause and builds again while another error is present, the build starts anew, succeeds, the upload fails and a new metadata error is thrown.

e.g Assume a missing email, a missing description field in Cargo.toml. We can also assume that one of them has just been misspelled. If one executes cargo publish, the index is updated, compilation is done, and at the time of uploading, one error is thrown and halts the upload (Say the error is a missing email).

Once the email error is fixed and publishing attempted again, the next field metadata error is thrown after compilation. This process continues for as many field errors as there are in the Cargo.toml file.

Compilation takes time.

The meta-deta reference docs clearly explain what should be required in the metadata, but multiple minor mistakes are prone to happen sometimes. Could these errors be bundled up together and all shown to user after complication, or at the time the upload is attempted?

@ehuss ehuss transferred this issue from rust-lang/cargo Nov 30, 2020
@ehuss
Copy link
Contributor

ehuss commented Nov 30, 2020

I have transferred this to the crates.io issue tracker. Errors are generated on the server side, so any sort of "consolidate multiple errors" will need to be implemented here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works
Projects
None yet
Development

No branches or pull requests

3 participants