Skip to content

x/pkgsite: use accurate same-module test for package imports #81962

Open

Description

@jba

When we count the number of packages importing some package P, we want to exclude other packages in P's module, because they don't tell us about the popularity of P.

Previously, we didn't have module information at the place we were doing the counting, so we approximated this check syntactically, using path prefixes. This could give the wrong counts in some cases, for example when modules where nested.

We've rewritten the counting logic and now it's easy to be precise about module boundaries. We haven't made the change yet, however, because it will change many numbers and we want to avoid that while we're also introducing module counts. We also want to understand its effect better.

Once that's all happened, we should use the more accurate logic.

Activity

  1. self-assigned this
    on Oct 2, 2026
  2. added this to the pkgsite/upcoming milestone on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions