Skip to content
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

Reverse dependency not shown as I would have expected #10915

Open
carols10cents opened this issue Mar 28, 2025 · 5 comments
Open

Reverse dependency not shown as I would have expected #10915

carols10cents opened this issue Mar 28, 2025 · 5 comments

Comments

@carols10cents
Copy link
Member

carols10cents commented Mar 28, 2025

Current Behavior

The shutdown-barrier crate doesn't show any reverse dependencies on its page: https://crates.io/crates/shutdown-barrier/reverse_dependencies

But this version of the stack-queue crate depends on shutdown-barrier as shown here: https://crates.io/crates/stack-queue/0.0.1-beta.16/dependencies

That version isn't yanked, but it is a prerelease? Do we not show rev deps that come from prerelease versioned crates...? Or is there something else wrong in this case? Or am I wrong??

Expected Behavior

I expected stack-queue to show up on shutdown-barrier's reverse dependencies page.

@Turbo87
Copy link
Member

Turbo87 commented Mar 28, 2025

yeah, we only show reverse deps of the default versions of crates

@eth3lbert
Copy link
Contributor

eth3lbert commented Mar 29, 2025

Yeah, and mostly due to performance considerations! If we'd like to provide this information, on my machine, the query execution time takes 3.x times longer (for serde, this comes to 800+ms). Though I'm not sure how it performs on the production db, from experience it would be even slower.

@carols10cents
Copy link
Member Author

Yeah, that makes sense. I guess i have to be paying more attention to the admin crate delete tool that warns you when you're about to try to delete something with rev deps 😅

I can see this being an issue with people trying to delete their own crates as well and being told their crate can't be deleted because there are reverse dependencies but not being able to see the reverse dependencies?

I know there have been cases where crates owned by the same person depend on each other, so they actually could be eligible for deletion if you delete the leaf crates first, but unless you can see that it can be hard to figure out.

Could we possibly add some text to the rev deps page that says "reverse dependencies on the default version" and then have a link to "see dependencies on all versions" to run the slower query on-demand?

@eth3lbert
Copy link
Contributor

I think all the suggestions make sense to me, and I can see that without this, the user might just send a support email asking for it. If we could give a url to navigate the user to inspect more details, it would mitigate the burden for the support team.

@eth3lbert
Copy link
Contributor

then have a link to "see dependencies on all versions" to run the slower query on-demand?

Oh, and regarding this, we currently only show rev-deps on the default version, which implies that we unify versions. I suppose showing all versions here would display them without unifying them? And given that the records might become much larger, we probably also want to provide seek-based pagination for this endpoint?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants