Prompt crate owner with list of broken dependencies upon yanking action #5266
WalterSmuts
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
I agree that we should warn the maintainers about the consequences of yanking a crate. IMHO crates/versions shouldn't even be yanked just because there are bugs in them. Just publish a new bugfix on top of the existing version and then cargo should pick up that new version automatically. I haven't been around when the yanking feature was introduced, but I'm quite curious what the rationale for it was, because I don't know any other package ecosystems that allow this. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A yank can cause dependent crates to be un-usable for new users. The user will experience a dependency resolution failure on the dependency of the crate they're trying to download:
Currently this type of failure is not presented to the user performing the yank. My suggestion is to present the yanking user with all the dependent crates (okay, we're limited to those listed on crates.io) that the yank action would break, prompting the user to confirm or abort the yank-action.
The intended use-case:
A crate owner finds an obscure bug in their library. It is unlikely that dependent crates use the library in a way to trigger the bug, but for completeness the user wants to yank the crate, fix the bug, and publish the new version. If the user yanks their library before publishing the fix, the dependent crates would become unusable by new users. The prompt would present the owner with the impact of the yank action. The owner can then re-asses their plan and, if appropriate, publish the fix first and then yank the previous version.
This idea goes hand-in-hand with notifying the owners of crates that are broken by a yank-action. That idea is discussed here #5230
Beta Was this translation helpful? Give feedback.
All reactions