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: manually mark alternative modules #52329

Closed
jba opened this issue Apr 13, 2022 · 1 comment
Closed

x/pkgsite: manually mark alternative modules #52329

jba opened this issue Apr 13, 2022 · 1 comment

Comments

@jba
Copy link
Contributor

jba commented Apr 13, 2022

When pkgsite sees that a module path does not match the path in the go.mod file, it marks the module as "alternative" and does not process or display it. If a module does not have a go.mod file, then pkgsite always processes and displays it, even if people would consider it "alternative."

For example, github.com/Azure/azure-sdk-for-go does not have a go.mod file, and may never have one. But that path is clearly the canonical one; all the documentation and sample code uses it. Forks just sow confusion and interfere with processing legitimate modules.

Even if a module has a go.mod file, alternatives at older versions that do not have one are processed and displayed. For example, github.com/Shopify/sarama last lacked a go.mod file at v1.20.1, over three years ago, but pkgsite still displays github.com/shopify/sarama (note the lowercase "s"). Again, this is confusing (see #52192).

A simple solution would be to maintain a list of alternative module paths. Incoming modules on this list would be marked "alternative" in the database, and would not be processed. Existing versions would be removed. We would add paths to this list when users brought them to our attention, or when we noticed that they gummed up processing.

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/400357 mentions this issue: internal/fetch: list known alternative module paths

@golang golang locked and limited conversation to collaborators Apr 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants