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: lower score of previous path in case of module rename #37252

Open
myitcv opened this issue Feb 16, 2020 · 9 comments
Open

x/pkgsite: lower score of previous path in case of module rename #37252

myitcv opened this issue Feb 16, 2020 · 9 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite/search Issues related to pkg.go.dev search functionality pkgsite UX Issues that involve UXD/UXR input

Comments

@myitcv
Copy link
Member

myitcv commented Feb 16, 2020

What is the URL of the page with the issue?

https://pkg.go.dev/github.com/myitcv/govim/cmd/govim/config?tab=doc

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.66 Safari/537.36

Screenshot

Screen Shot 2020-02-16 at 20 02 26

What did you do?

Visited the above page.

What did you expect to see?

Expected to see v0.0.29 as the latest version.

What did you see instead?

Saw v0.0.22 which was released a long time ago:

Screen Shot 2020-02-16 at 20 03 13

@myitcv myitcv added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite labels Feb 16, 2020
@gopherbot gopherbot added this to the Unreleased milestone Feb 16, 2020
@myitcv
Copy link
Member Author

myitcv commented Feb 16, 2020

Hmm, the latest version updated soon after I did a go get via the proxy. For this particular module, most people end up cloning the repo via a Vim plugin manager. So I guess the lesson here is that I need to semi-regularly do a go get for latest via the proxy?

@myitcv
Copy link
Member Author

myitcv commented Feb 16, 2020

Very embarrassing. I was looking with my eyes shut.

Prior to being github.com/govim/govim the module was github.com/myitcv/govim. The search results for govim pull back both, and I was not careful enough in spotting which module I was looking at. The flip happened post v0.0.22, hence the confusion.

In situations like this, is there some way that the module own can indicate to pkg.go.dev that a rename has happened? Such that the new module path always ranks higher than the old module path?

@myitcv myitcv changed the title go.dev: latest version for a package is very stale go.dev: lower score of previous path in case of module rename Feb 16, 2020
@bcmills
Copy link
Contributor

bcmills commented Feb 19, 2020

See previously #37187.

@myitcv
Copy link
Member Author

myitcv commented Feb 19, 2020

Thanks @bcmills

Hmm, that's interesting. That's uncovered what I consider to be a problem with the proxy.

export GOPATH=$(mktemp -d) 
cd $(mktemp -d) 
go mod init mod.com
go get github.com/myitcv/govim@latest

gives:

go: downloading github.com/myitcv/govim v0.0.29
go: github.com/myitcv/govim latest => v0.0.29
go get: github.com/myitcv/govim@v0.0.29: parsing go.mod:
        module declares its path as: github.com/govim/govim
                but was required as: github.com/myitcv/govim

i.e. the proxy considers that versions > v0.0.22 (the point at which the module path changed) as being valid for github.com/myitcv/govim, even though all such versions actually correspond to github.com/govim/govim.

Or have I missed something here?

@bcmills
Copy link
Contributor

bcmills commented Feb 19, 2020

In general a module with a mismatched module path may be intended for use with a replace directive for the corresponding module. So the proxy probably shouldn't reject those out-of-hand.

It does appear that pkg.go.dev successfully suppresses the documentation for mismatched versions. (https://pkg.go.dev/github.com/myitcv/govim?tab=versions ends at v0.0.22.)

@myitcv
Copy link
Member Author

myitcv commented Feb 19, 2020

In general a module with a mismatched module path may be intended for use with a replace directive for the corresponding module. So the proxy probably shouldn't reject those out-of-hand.

Of course. Totally forgot about that, thank you.

@myitcv
Copy link
Member Author

myitcv commented Mar 5, 2020

Interestingly, https://pkg.go.dev/search?q=govim now no longer shows any results from the previous module path:

Screen Shot 2020-03-05 at 12 03 48

Given @bcmills' observations above, I would have expected the results for github.com/myitcv/govim to still appear, but simply be ranked lower.

Was there a change here, @julieqiu?

@julieqiu
Copy link
Member

@myitcv - seems like this is related to #37187.

Closing this issue since it seems #37252 (comment) has been addressed. Feel free to reopen if that is not the case!

@myitcv
Copy link
Member Author

myitcv commented Mar 13, 2020

@julieqiu - there is now a slightly different issue, per #37252 (comment), despite https://pkg.go.dev/github.com/myitcv/govim?tab=doc being a valid package (which should match the search term "govim")

@myitcv myitcv reopened this Mar 13, 2020
@julieqiu julieqiu changed the title go.dev: lower score of previous path in case of module rename x/pkgsite: lower score of previous path in case of module rename Jun 15, 2020
@julieqiu julieqiu added the UX Issues that involve UXD/UXR input label Jun 15, 2020
@julieqiu julieqiu modified the milestones: Unreleased, pkgsite/search Aug 19, 2020
@julieqiu julieqiu removed the website label Sep 22, 2020
@julieqiu julieqiu removed the website label Sep 22, 2020
@hyangah hyangah added the pkgsite/search Issues related to pkg.go.dev search functionality label May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite/search Issues related to pkg.go.dev search functionality pkgsite UX Issues that involve UXD/UXR input
Projects
None yet
Development

No branches or pull requests

5 participants