Skip to content

x/pkgsite: add statistics about module usage #39783

@dsnet

Description

@dsnet

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.UXIssues that involve UXD/UXR inputpkgsite

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions