-
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
Cannot dry-run cargo publish
without bumping versions
#14721
Comments
See also #14550 (comment) |
What kind of workflows it may break? The benefit of #14448 is it fails fast, so users don't need to wait for the verification step. Unless I misunderstood, it doesn't really change any final result of non dry-run publish. |
I've been thinking more about that comment I made. A lot of it comes down to framing. If you view this as general validation, it should always be reported. If you view this as just reporting the upload error earlier, than warning or ignoring is perfectly fine. I do not remember what I was considering when I said it could break other workflows. |
If it is not too hard to downgrade to a warning, I am slightly inclined to that. |
The team discussed this today and decided to downgrade it to a warning for dry-run only, which is up at #14742. |
fix(publish): Downgrade version-exists error to warning on dry-run ### What does this PR try to resolve? Especially for beta, this was the most conservative, minimal change. Fixes #14721 ### How should we test and review this PR? ### Additional information This will get cherry-picked to beta
This will get cherry-picked to beta Fixes rust-lang#14721
Problem
When a tool like
cargo release
runs in a dry-run mode, it shouldn't be bumping version numbers. However, as of #14448,cargo publish --dry-run
will fail unless the version numbers are bumpedSteps
Possible Solution(s)
Revert #14448 which makes us lose out on early error reporting. However, if we view publish as plumbing with tools like
cargo release
handling it, make its not too badSkip #14448's check in dry-run mode or downgrade it to a warning. Deviating behavior between dry-run or not can be confusing and break other workflows.
Tell people to use
cargo package
. There are slight behavior differences though.Notes
cargo 1.83.0-beta.2 (15fbd2f 2024-10-08)
Version
No response
The text was updated successfully, but these errors were encountered: