Description
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?