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: incorrectly identifies sub-module #42346

Closed
codyoss opened this issue Nov 2, 2020 · 7 comments
Closed

x/pkgsite: incorrectly identifies sub-module #42346

codyoss opened this issue Nov 2, 2020 · 7 comments
Labels
FrozenDueToAge help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite

Comments

@codyoss
Copy link
Member

codyoss commented Nov 2, 2020

What is the URL of the page with the issue?

https://pkg.go.dev/cloud.google.com/go?tab=subdirectories

Screenshot

Screen Shot 2020-11-02 at 11 14 47 AM

What did you do?

Navigate to the page linked above.

What did you expect to see?

cloud.google.com/go/compute/metadata NOT listed as a sub-module.

What did you see instead?

cloud.google.com/go/compute/metadata listed as a sub-module.

It was it's own module at one point, but it is no longer and has not been for many releases.

@gopherbot gopherbot added this to the Unreleased milestone Nov 2, 2020
@jba jba added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 2, 2020
@jba jba modified the milestones: Unreleased, pkgsite/unplanned Nov 2, 2020
@julieqiu
Copy link
Member

julieqiu commented Nov 4, 2020

It was it's own module at one point, but it is no longer and has not been for many releases.

We could dedupe the list of nested modules and packages for a given page, and not list the nested module if it is a package in that module.

On https://beta.pkg.go.dev/cloud.google.com/go@v0.71.0, compute/metadata is listed as both a package and a nested module.

image

image

@trongbq
Copy link

trongbq commented Nov 9, 2020

@julieqiu I can help on this one.

@julieqiu
Copy link
Member

julieqiu commented Nov 9, 2020

Thanks, @trongbq!

@trongbq
Copy link

trongbq commented Nov 23, 2020

@julieqiu

We could dedupe the list of nested modules and packages for a given page, and not list the nested module if it is a package in that module.

I think that is not a good approach to solve this issue. This issue happens because somehow pkgsite falsely identified compute/metadata as both package and module, but as issue states that with newer versions, compute/metadata is no longer a module.
Should we look for the fix in worker fetch instead?

@julieqiu
Copy link
Member

julieqiu commented Dec 2, 2020

This issue happens because somehow pkgsite falsely identified compute/metadata as both package and module, but as issue states that with newer versions, compute/metadata is no longer a module.

I don't think that this identification is incorrect, just that the information isn't necessarily useful in the directories section of cloud.google.com/go (https://pkg.go.dev/cloud.google.com/go#section-directories).

cloud.google.com/go/compute/metadata technically is a module (https://proxy.golang.org/cloud.google.com/go/compute/metadata/@v/v0.0.0-20181115181204-d50f0e9b2506.mod), and users should be able to view that module version on pkg.go.dev (https://pkg.go.dev/cloud.google.com/go/compute/metadata@v0.0.0-20181115181204-d50f0e9b2506).

However, it is likely that most (if not all) users are looking for the version of compute/metadata in cloud.google.com/go. This is why I suggested deduping the list in #42346 (comment).

This wouldn't cover the case where a nested module was deleted (for example, cloud.google.com/go/compute/metadata was deleted completely from cloud.google.com/go). That might be better addressed by #41321.

Should we look for the fix in worker fetch instead?

I'm not sure I see what change could be made in the worker to fix this issue. Would you mind elaborating on what you're thinking?

@trongbq
Copy link

trongbq commented Dec 3, 2020

@julieqiu Ah I see, my assumption was wrong, thank you for such a detailed explanation.
I will start work on on this based on your suggestion in the comment above.

@gopherbot
Copy link

Change https://golang.org/cl/276592 mentions this issue: frontend: this change dedupes the list of nested module and package

@golang golang locked and limited conversation to collaborators Dec 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Projects
None yet
Development

No branches or pull requests

5 participants