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

Show dependents #814

Closed
vemv opened this issue Oct 26, 2021 · 6 comments
Closed

Show dependents #814

vemv opened this issue Oct 26, 2021 · 6 comments

Comments

@vemv
Copy link

vemv commented Oct 26, 2021

This GH feature is nice https://github.com/brettwooldridge/HikariCP/network/dependents i.e. I might be interested in knowing who depends on a given artifact.

Some use cases:

  • I'm a maintainer, I'm interested in how is my API being used
  • I'm a user, I want some usage examples

I believe GH's dependents feature has Clojure as sort of a second-class citizen, so having it in Clojars would seem handy. Naturally it could be placed below this section:

image

Cheers - V

tobias added a commit that referenced this issue Oct 26, 2021
This will show other Clojars project versions that depend on the jar
project version being viewed.

See #814
tobias added a commit that referenced this issue Oct 27, 2021
This will show other Clojars project versions that depend on the jar
project version being viewed.

See #814
@tobias
Copy link
Member

tobias commented Oct 27, 2021

That's a really great idea @vemv! I went ahead and implemented it. You should now see a Dependents section below Dependencies. That will show up to 10 projects that depend on the current jar version, with a link to a page that will show all of the projects and their versions that depend on it:

image

Potemkin is a good example:

Does that work for you?

@vemv
Copy link
Author

vemv commented Oct 27, 2021

That's amazing @tobias ! Happy to see this alive and so quickly.

Personally, when visiting e.g. https://clojars.org/clj-kondo (no version in the url) I'd expect the dependents to be any dependents, regardless of the version.

My reasoning is that some libraries update quite frequently, so an update shouldn't make the dependents "disappear".

If visiting https://clojars.org/clj-kondo/versions/2021.10.19 (with version with the url) the algo would be more straighforward: show dependents on that specific version.

I do imagine the rationale behind the current impl, i.e. if dependent x was only a dependent for a very old version, then it's not accurate to show that as a dependent forever and ever.

Perhaps a middle ground algo can be worked out, e.g.

A lib x is considered a dependent of lib y at version v if:

  • x depends exactly on y@v; OR
  • x depended on y within the last 365 days; OR
  • x depends on y in a version-compatible way (i.e. no major breakage per semver)

Of course sky is the limit with heuristics, probably one can start small and grow it from there.

Cheers - V

@vemv
Copy link
Author

vemv commented Oct 27, 2021

ps - there's a typo (Dependenies)

@tobias
Copy link
Member

tobias commented Oct 29, 2021

Thanks for the feedback @vemv!

That makes sense. One issue with the route without a version is it just takes you to the latest non-SNAPSHOT version, so that page is really a version page. But I agree it would be useful to be able to see the dependents of the project, not just the version.

What if, for every version, we:

  • Show dependents in the sidebar for the project as a whole no matter what version is being viewed, sorted by version they depend on.
  • Link out to a dependents page, but that is again for the entire project. It shows dependents, but grouped by project version.

ps - there's a typo (Dependenies)

Thanks! I fixed this on main, but haven't yet deployed it.

@tobias
Copy link
Member

tobias commented Oct 31, 2021

@vemv I implemented what I outlined above, please take a look and let me know what you think.

@vemv
Copy link
Author

vemv commented Nov 1, 2021

Hey @tobias it looks very neat, kudos!

I definitely see myself / others giving much use to the current impl.

@vemv vemv closed this as completed Nov 1, 2021
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

2 participants