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: package removal request for github.com/tidwall/geodesic #48562

Closed
tidwall opened this issue Sep 22, 2021 · 9 comments
Closed

x/pkgsite: package removal request for github.com/tidwall/geodesic #48562

tidwall opened this issue Sep 22, 2021 · 9 comments
Labels
FrozenDueToAge pkgsite/package-removal Issues for package removal. See https://pkg.go.dev/about#removing-a-package pkgsite

Comments

@tidwall
Copy link

tidwall commented Sep 22, 2021

What is the path of the package that you would like to have removed?

https://pkg.go.dev/github.com/tidwall/geodesic

Specifically, I only want v1.52.1 and v1.52.2 removed because these are no longer valid tags.

https://pkg.go.dev/github.com/tidwall/geodesic@v1.52.1
https://pkg.go.dev/github.com/tidwall/geodesic@v1.52.2

I want to keep the pre-v1 versions. Right now v0.3.0 should be the latest.

Are you the owner of this package?

Yes

What is the reason that you could not retract this package instead?

I added these lines to the go.mod file.

retract v1.52.1
retract v1.52.2

And go get github.com/tidwall/geodesic@latest correctly shows:

$ go get github.com/tidwall/geodesic@latest
go: downloading github.com/tidwall/geodesic v0.3.0

But https://pkg.go.dev/github.com/tidwall/geodesic still has v1.52.2 as the latest/default version.

@gopherbot gopherbot added this to the Unreleased milestone Sep 22, 2021
@komuw
Copy link
Contributor

komuw commented Sep 23, 2021

I get v1.52.2
go get github.com/tidwall/geodesic@latest

go: downloading github.com/tidwall/geodesic v1.52.2
go get: added github.com/tidwall/geodesic v1.52.2

both when I use go1.16 and go1.18-d0dd26a88c

@komuw
Copy link
Contributor

komuw commented Sep 23, 2021

From https://golang.org/ref/mod#go-mod-file-retract
To retract a version, a module author should add a retract directive to go.mod, then publish a new version containing that directive. The new version must be higher than other release or pre-release versions

this is probably why the retraction is not working; the retract statement is set at a lower version

@tidwall
Copy link
Author

tidwall commented Sep 23, 2021

Interesting, it seems that the retract directive that I added did work correctly for the go get command.

For example, when I do a go list, it returns the correct versions and recognizes v0.3.0 as the latest.

$ go list -m -u -versions github.com/tidwall/geodesic
github.com/tidwall/geodesic v0.1.0 v0.2.0 v0.2.1 v0.3.0

$ go list -m -u github.com/tidwall/geodesic@latest
github.com/tidwall/geodesic v0.3.0

But, the pkg.go.dev website does not point to v0.3.0 as the latest.

https://pkg.go.dev/github.com/tidwall/geodesic

Is there a way I can purge the package entirely from pkg.go.dev, and then allow for it to rebuild using the correct versions?

@tidwall
Copy link
Author

tidwall commented Sep 23, 2021

I confused. I wonder whey my go get is returning different results than yours?

@seankhliao
Copy link
Member

Do you have GOPROXY=direct or GOPRIVATE set?

@tidwall
Copy link
Author

tidwall commented Sep 23, 2021

Thanks for all the feedback.

Since the Go documentation clearly states that you cannot retract the latest version, it seems that there is nothing I can do at this point but to use a higher version number.

I'm closing the issue for now.

@tidwall tidwall closed this as completed Sep 23, 2021
@seankhliao
Copy link
Member

You can publish a higher version and at the same time retract it, ie create v1.52.3 and in it retract v1.52.1 - v1.52.3

@tidwall
Copy link
Author

tidwall commented Sep 23, 2021

@seankhliao Thanks for the tip. I just tried that. I added this to go.mod

retract (
	v1.52.3 
	v1.52.2 
	v1.52.1 
)

and create two new versions, v0.3.1 and v1.52.3 that point to the same commit.

https://pkg.go.dev/github.com/tidwall/geodesic still shows

image

https://pkg.go.dev/github.com/tidwall/geodesic@v1.52.3 show

image

Interestingly, searching for the package https://pkg.go.dev/search?q=geodesic&m=package displays the correct version.

image

Also go list -m -u github.com/tidwall/geodesic@latest now shows.

$ go list -m -u github.com/tidwall/geodesic@latest
go list -m: github.com/tidwall/geodesic@v1.52.3: retracted by module author: versions that no longer exists in trunk

So it kinda works, kinda doesn't. 🤷‍♂️

@tidwall
Copy link
Author

tidwall commented Sep 23, 2021

It seems to work now.

go list -m -u github.com/tidwall/geodesic

and

https://pkg.go.dev/github.com/tidwall/geodesic

point to the same version

Magic. I'm a happy boy. :)

@hyangah hyangah added the pkgsite/package-removal Issues for package removal. See https://pkg.go.dev/about#removing-a-package label May 20, 2022
@golang golang locked and limited conversation to collaborators May 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge pkgsite/package-removal Issues for package removal. See https://pkg.go.dev/about#removing-a-package pkgsite
Projects
None yet
Development

No branches or pull requests

6 participants