-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Non actionable error message #15765
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
Open
ojuschugh1
wants to merge
9
commits into
rust-lang:master
Choose a base branch
from
ojuschugh1:Non-actionable_error_message
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Non actionable error message #15765
ojuschugh1
wants to merge
9
commits into
rust-lang:master
from
ojuschugh1:Non-actionable_error_message
+324
−14
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This test demonstrates current inadequate error behavior when workspace publishing fails. Users don't know which package failed or which packages are still pending publication.
When a package fails to publish, the error message now includes the package name to help users identify which package failed. This improves error reporting by providing clear context about which specific package encountered the error.
When a package fails to publish during workspace publishing, the error message now includes a list of remaining packages that have not been published yet. This helps users understand the full scope of what still needs to be published after a failure occurs.
Updated the workspace publish error reporting test to reflect the improved error messages that now include package names and remaining unpublished packages. The test verifies that both timeout scenarios and transmit failures provide clear, actionable error messages to users.
epage
reviewed
Jul 22, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-interacts-with-crates.io
Area: interaction with registries
Command-publish
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR try to resolve?
This PR improves the error reporting experience when running
cargo publish
on a workspace. Previously, if publishing failed partway through (for example, due to rate limiting or a server error), Cargo would emit a non-actionable error message that did not indicate which package failed or which packages were still pending publication. This made it difficult for users to recover from errors or know what steps to take next.This PR addresses issue #15754 by:
How to test and review this PR?
Testing:
tests/testsuite/publish.rs
:Review Guidance:
src/cargo/ops/registry/publish.rs
for error context enhancements and message formatting.tests/testsuite/publish.rs
to see how error scenarios are simulated and validated.cargo publish
on a workspace with multiple packages and simulate a failure (e.g., by using a test registry or causing a network error) to see the improved error output in action.Example improved error message:
Summary:
This PR makes workspace publishing failures much more actionable and user-friendly, helping users quickly identify what went wrong and what steps to take next. All changes are covered by tests and follow Cargo’s contribution guidelines.