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: latest version gets confused by old conflicting subdirectory / submodule #56408

Closed
guregu opened this issue Oct 25, 2022 · 1 comment

Comments

@guregu
Copy link

guregu commented Oct 25, 2022

What is the URL of the page with the issue?

https://pkg.go.dev/github.com/trealla-prolog/go@v0.11.1/trealla

What is your user agent?

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36

Screenshot

2022-10-25

What did you do?

Accessed the "trealla" subpackage from this URL: https://pkg.go.dev/github.com/trealla-prolog/go#section-directories

What did you expect to see?

No "latest version" warning (as of writing v0.11.1 is the latest version).

What did you see instead?

Red "latest version" button linking to a very outdated version.

Cause?

While trying to figure out the best way to publish a package in a subdirectory, I tried a bunch of configurations of "root go.mod module in a subdirectory", "go.mod in root and child directory", etc.
Eventually I settled on a single go.mod in the parent directory.
pkg.go.dev remembers one of these old attempts as the newest version for this subdirectory package which is confusing to users and means I can't link to it to point to the latest version (currently the latest version is here).
I tried to retract the old version but it's a git hash pseudoversion and I wasn't able to get it to 'forget' the old package.

Is there any way to get the site to prefer my newer parent package instead?

@guregu guregu added the pkgsite label Oct 25, 2022
@gopherbot gopherbot added this to the Unreleased milestone Oct 25, 2022
@seankhliao
Copy link
Member

you could make a branch with:

trealla/go.mod:

module github.com/tralla-prolog/go/trealla

retract [v0.0.0-0, v0.0.1]

and tag it v0.0.1

see https://go.dev/ref/mod#go-mod-file-retract

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2022
@golang golang locked and limited conversation to collaborators Oct 27, 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