-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cargo publish --dry-run
finishes very early
#11514
Comments
Can you say more about which validation errors did not seem to run? If this is related to validation done on the server side, that would require implementing a new publishing API which is outlined in rust-lang/crates-io-cargo-teams#82. That is likely a large project that would require working mostly with the crates.io team, and possibly an RFC outlining the design. |
Specifically it was:
Just checked the other issues and I understand why this is not something that can be resolved client-side, but maybe it would be worth it to differentiate server-side and client-side validation, even if there is an API for doing so? |
Thank you for the reply! crates.io is only one implementation of remote registries. Other registries may have different validations and requirements. Cargo at this moment sticks to a common minimal set of validations across different registries. I feel like it might break other registries publishing process for such kind of change. Going to close this in favor of #5941, as more discussions happened there. If it is wrong, comment below and we can re-open this. |
Problem
I wanted to know what I was missing before running
cargo publish
, but did not accidentally want to publish a crate. When I rancargo publish --dry-run
it terminated before the upload, but it does not actually reach the point where it checks theCargo.toml
for validation errors. Thus, it seems to me that--dry-run
is kind of pointless.Proposed Solution
Make
--dry-run
error out only right before a crate is actually published, rather than before upload.Notes
I'd be willing to implement this, if it is acceptable.
The text was updated successfully, but these errors were encountered: