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

Open
dsnet opened this issue Jun 23, 2020 · 2 comments
Open

x/pkgsite: add statistics about module usage #39783

dsnet opened this issue Jun 23, 2020 · 2 comments
Labels
FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite UX Issues that involve UXD/UXR input

Comments

@dsnet
Copy link
Member

dsnet commented Jun 23, 2020

Thanks for the great work on go.dev 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 github.com/golang/protobuf 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 github.com/golang/protobuf 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.

@gopherbot gopherbot added this to the Unreleased milestone Jun 23, 2020
@cagedmantis cagedmantis added pkgsite NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jun 23, 2020
@cagedmantis
Copy link
Contributor

/cc @julieqiu

@julieqiu
Copy link
Member

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

@julieqiu julieqiu added UX Issues that involve UXD/UXR input FeatureRequest labels Jun 24, 2020
@julieqiu julieqiu removed the website label Sep 22, 2020
@julieqiu julieqiu removed the website label Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite UX Issues that involve UXD/UXR input
Projects
None yet
Development

No branches or pull requests

4 participants