Commit 0bfd820
authored
Add more context to publish-failed error message (#15879)
## What does this PR try to resolve?
This PR fixes issue #15754 where workspace publish failures provided
non-actionable error messages. Previously, when publishing a workspace
failed (due to rate limiting or other errors), users only saw generic
errors like `[ERROR] failed to publish to registry` without knowing
which package failed or what packages remained to be published.
## How to test and review this PR?
**Testing**: Run `cargo test workspace_publish_rate_limit_error` to see
the improved behavior, then `cargo test publish` to ensure all tests
pass.
**Review**:
- **Commit 1**: Adds test demonstrating current problematic behavior
- **Commit 2**: Implements fix and updates test to expect improved
output
The fix transforms error messages from generic `failed to publish to
registry` to actionable `failed to publish 'package_a' v0.1.0; the
following crates have not been published yet: package_b v0.1.0,
package_c v0.1.0`. This improvement applies consistently across all
publish error scenarios, giving users clear information about what went
wrong and what remains to be done.File tree
2 files changed
+139
-10
lines changed- src/cargo/ops/registry
- tests/testsuite
2 files changed
+139
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
| 214 | + | |
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
| |||
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
239 | 253 | | |
240 | 254 | | |
241 | 255 | | |
| |||
244 | 258 | | |
245 | 259 | | |
246 | 260 | | |
| 261 | + | |
247 | 262 | | |
248 | 263 | | |
249 | 264 | | |
| |||
632 | 647 | | |
633 | 648 | | |
634 | 649 | | |
| 650 | + | |
635 | 651 | | |
636 | 652 | | |
637 | 653 | | |
| |||
641 | 657 | | |
642 | 658 | | |
643 | 659 | | |
644 | | - | |
645 | | - | |
646 | | - | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
647 | 669 | | |
648 | 670 | | |
649 | 671 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2260 | 2260 | | |
2261 | 2261 | | |
2262 | 2262 | | |
2263 | | - | |
| 2263 | + | |
2264 | 2264 | | |
2265 | 2265 | | |
2266 | 2266 | | |
| |||
2308 | 2308 | | |
2309 | 2309 | | |
2310 | 2310 | | |
2311 | | - | |
| 2311 | + | |
2312 | 2312 | | |
2313 | 2313 | | |
2314 | 2314 | | |
| |||
2356 | 2356 | | |
2357 | 2357 | | |
2358 | 2358 | | |
2359 | | - | |
| 2359 | + | |
2360 | 2360 | | |
2361 | 2361 | | |
2362 | 2362 | | |
| |||
2413 | 2413 | | |
2414 | 2414 | | |
2415 | 2415 | | |
2416 | | - | |
| 2416 | + | |
2417 | 2417 | | |
2418 | 2418 | | |
2419 | 2419 | | |
| |||
2461 | 2461 | | |
2462 | 2462 | | |
2463 | 2463 | | |
2464 | | - | |
| 2464 | + | |
2465 | 2465 | | |
2466 | 2466 | | |
2467 | 2467 | | |
| |||
3608 | 3608 | | |
3609 | 3609 | | |
3610 | 3610 | | |
3611 | | - | |
| 3611 | + | |
3612 | 3612 | | |
3613 | 3613 | | |
3614 | 3614 | | |
| |||
4402 | 4402 | | |
4403 | 4403 | | |
4404 | 4404 | | |
| 4405 | + | |
| 4406 | + | |
| 4407 | + | |
| 4408 | + | |
| 4409 | + | |
| 4410 | + | |
| 4411 | + | |
| 4412 | + | |
| 4413 | + | |
| 4414 | + | |
| 4415 | + | |
| 4416 | + | |
| 4417 | + | |
| 4418 | + | |
| 4419 | + | |
| 4420 | + | |
| 4421 | + | |
| 4422 | + | |
| 4423 | + | |
| 4424 | + | |
| 4425 | + | |
| 4426 | + | |
| 4427 | + | |
| 4428 | + | |
| 4429 | + | |
| 4430 | + | |
| 4431 | + | |
| 4432 | + | |
| 4433 | + | |
| 4434 | + | |
| 4435 | + | |
| 4436 | + | |
| 4437 | + | |
| 4438 | + | |
| 4439 | + | |
| 4440 | + | |
| 4441 | + | |
| 4442 | + | |
| 4443 | + | |
| 4444 | + | |
| 4445 | + | |
| 4446 | + | |
| 4447 | + | |
| 4448 | + | |
| 4449 | + | |
| 4450 | + | |
| 4451 | + | |
| 4452 | + | |
| 4453 | + | |
| 4454 | + | |
| 4455 | + | |
| 4456 | + | |
| 4457 | + | |
| 4458 | + | |
| 4459 | + | |
| 4460 | + | |
| 4461 | + | |
| 4462 | + | |
| 4463 | + | |
| 4464 | + | |
| 4465 | + | |
| 4466 | + | |
| 4467 | + | |
| 4468 | + | |
| 4469 | + | |
| 4470 | + | |
| 4471 | + | |
| 4472 | + | |
| 4473 | + | |
| 4474 | + | |
| 4475 | + | |
| 4476 | + | |
| 4477 | + | |
| 4478 | + | |
| 4479 | + | |
| 4480 | + | |
| 4481 | + | |
| 4482 | + | |
| 4483 | + | |
| 4484 | + | |
| 4485 | + | |
| 4486 | + | |
| 4487 | + | |
| 4488 | + | |
| 4489 | + | |
| 4490 | + | |
| 4491 | + | |
| 4492 | + | |
| 4493 | + | |
| 4494 | + | |
| 4495 | + | |
| 4496 | + | |
| 4497 | + | |
| 4498 | + | |
| 4499 | + | |
| 4500 | + | |
| 4501 | + | |
| 4502 | + | |
| 4503 | + | |
| 4504 | + | |
| 4505 | + | |
| 4506 | + | |
| 4507 | + | |
| 4508 | + | |
| 4509 | + | |
| 4510 | + | |
| 4511 | + | |
0 commit comments