-
Notifications
You must be signed in to change notification settings - Fork 18k
x/website/tour: installing @latest gets older version #47236
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
Comments
Hmm, this doesn't seem to happen in GOPROXY=direct mode, so maybe the module mirror is playing a role. I'll check again later. |
I understand why this is happening and can confirm both the go command and module mirror are working as expected. Specifically, https://golang.org/ref/mod#resolve-pkg-mod specifies that:
When the module mirror is used, the latest versions of both x/website and x/website/tour modules are found, both contain the I suspect we'll need to fix this by publishing a newer version of the x/website/tour module that retracts its past versions and/or deletes the |
#39007 is closely related. |
I guess this is still an issue in 2025. This seems like it would be an important bug but no attention in 4 years?
|
@ericfrederich Yes, there is a workaround, as mentioned in the original report:
For example,
That said, I agree this bug is unfortunate and would be good to fix since beginners are less likely to discover that there is a workaround. CC @golang/tools-team via owners. |
Change https://go.dev/cl/653155 mentions this issue: |
It stopped being a nested module and its content was merged into x/website in CL 323897. It was never intended to be a published module, rather it happened to be one during earlier development of x/website. Because the golang.org/x/website/tour module has a longer path than the golang.org/x/website module, it gets in the way when trying to install or run the latest version of the tour command. So, deprecate and retact all of its versions to fix that. For golang/go#47236. Change-Id: I88615fc25cd6531d4650210ca8063c53a68ac81a
We've retracted all versions of the unintended x/website/tour module in v0.1.0 (including v0.1.0 itself), so now installing or running the tour with the "@latest" version query gets the latest version from the x/website module as intended:
Also, https://golang.org/x/website/tour now defaults to displaying documentation for the latest x/website version. (Previously it was displaying the latest x/website/tour version from 2021 by default.) Closing. |
A reasonable way to install the latest version of the
tour
binary from its latest location is by usinggo install
:However, doing so currently gets a slightly older version of the tour, before the x/website/tour nested module was merged into the x/website module in CL 323897.
Note that module path is
golang.org/x/website/tour
and version is a month-oldv0.0.0-20210616181959-e0d934b43647
, rather than the latest commit onmaster
branch:A workaround is to specify
@HEAD
or the exact version of tour one wants.The text was updated successfully, but these errors were encountered: