golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
122.85k stars 17.51k forks source link

proxy.golang.org: Wrong version of cli tool installed when using `@latest` #69053

Closed thetillhoff closed 2 weeks ago

thetillhoff commented 2 weeks ago

Problem

When I run go install github.com/thetillhoff/webscan/v3@latest it installs an old v1 version instead of the latest v3.0.2 version. How do I resolve this?

Context

Yesterday, I published a new major version (v3) and announced it to a small group of friends to try it out. One of my peers tried to install it with go install github.com/thetillhoff/webscan@latest, which failed with checksum mismatch.

So I dove into the docs and learned the module path should be adjusted with each major version and did that by publishing a new patch-version.

Now the go install works, both for specifying the newest version with go install github.com/thetillhoff/webscan/v3@v3.0.2 and go install github.com/thetillhoff/webscan/v3@latest. But the second command installs an old v1 version instead of the latest.

How can I best resolve this?

Afaik noone uses it so far, so if I break backwards compatibility or it's unavailable for a bit it's not a problem for me.

The source code can be found at https://github.com/thetillhoff/webscan.

seankhliao commented 2 weeks ago

how are you determining that the second command installs a v1 version?

thetillhoff commented 2 weeks ago

I ran go install github.com/thetillhoff/webscan/v3@latest locally.

But now that you mentioned it, I tried running it in a golang:1.23 container and it installs the actual latest version there.

Seems to be a local problem... Sorry for the inconvenience, I'll close this issue.