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

x/pkgsite: add statistics about module usage #39783

dsnet opened this issue Jun 23, 2020 · 2 comments

x/pkgsite: add statistics about module usage #39783

dsnet opened this issue Jun 23, 2020 · 2 comments


Copy link

@dsnet dsnet commented Jun 23, 2020

Thanks for the great work on website!

A given package has a "Imports" and "Imported By" tab, which allows you to get a sense of the dependency graph for a single package.

I propose adding a similar feature for modules, such that it would gain a "Requires" and a "Required By" tab that similarly presents the following information:

  • For the "Requires" tab, it shows the set of modules required by the latest version of this module.
    • For example, the latest version of depends on 3 other modules. I'd expect these to be readily displayed without needing to go to the go.mod file.
  • For the "Required By" tab, it shows the set of modules at their latest version that requires this module.
    • For example, the module is required by 8577 modules. I'd like to see this number and get a brief sample of some of these modules.
    • It'd be additionally be useful if the "Required By" tab could show the dependencies on specific versions of this module. For example, I'd like to easily see statistics similar to the following:
      • 1435x (16.7%) at v1.4
      • 6199x (72.3%) at v1.3
      • 721x (8.4%) at v1.2
      • 77x (0.9%) at v1.1
      • 45x (0.5%) at v1.0
      • 100x (1.2%) at v0.0

At the present moment, I obtain such information through a series of expensive queries on the module proxy.

Copy link

@cagedmantis cagedmantis commented Jun 23, 2020

/cc @julieqiu

Copy link

@julieqiu julieqiu commented Jun 24, 2020

Thanks for the suggestion, @dsnet! I think this is useful information to have. One of the motivations for creating the /mod namespace was to add these tabs later on.

We are currently working on a redesign of the site, and can work on figuring where this information might belong.

/cc @spf13 @fflewddur @Joanne881107 for product/UX input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.