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: "go to latest" button points to something that is not the latest #50631

Closed
seancfoley opened this issue Jan 15, 2022 · 2 comments
Closed

Comments

@seancfoley
Copy link

What is the URL of the page with the issue?

https://pkg.go.dev/github.com/seancfoley/ipaddress-go@v1.0.2/ipaddr

What is your user agent?

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

Screenshot

image

What did you do?

I have attempted to publish my module. The go modules documentation is not clear that you cannot use normal versioning numbering (eg v1.0.0) if you do not put the go.mod file at the root if the repository. So initially I had the go.mod in the main package ipaddr which is a directory in the repository. After a lot of trial and error, trying to figure out why the go tools would not work as I expected, I've now placed it at the root of the repo.

So my module is at https://pkg.go.dev/github.com/seancfoley/ipaddress-go

If I click on the "ipaddr" package is goes to https://pkg.go.dev/github.com/seancfoley/ipaddress-go@v1.0.2/ipaddr

On that page it has a red button "Go to latest" which takes me to my failed attempt to publish the package with the go.mod in a subdirectory. There are no versions in that failed attempt. Nor are the dates more recent. So it is clearly not the latest in any way, shape or form.

What did you expect to see?

I expect there to be no red button saying "Go to latest" taking you to a page which is not the latest.

What did you see instead?

I see a red button leading people to the wrong location. It takes you to a version of the package which is clearly not the latest, neither by date, nor by version. So the button should not be there, it is misleading.

@gopherbot gopherbot added this to the pkgsite/unplanned milestone Jan 15, 2022
@seankhliao
Copy link
Member

go uses the longest module path to determine the containing module.
You'll need to use retract to fix this (both for pkg.go.dev and for the go tool to resolve properly).

@seancfoley
Copy link
Author

The information I've seen on retract is for retracting versions, not pseudo-versions. Can you provide more info or a link?

@golang golang locked and limited conversation to collaborators Jan 15, 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

3 participants