-
Notifications
You must be signed in to change notification settings - Fork 18k
x/pkgsite/cmd/pkgsite: local pkgsite with local GOROOT serves wrong contents for standard-library packages #57742
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
pkgsite is using the local repo you provide at the version it reports. Moreover, it is doing exactly what you asked. You asked for doc at the "latest" version (since you didn't specify a version), and its notion of latest is "greatest semver tag, ignoring pre-releases." That is indeed 1.19.4. Using |
Using |
It didn't display docs for 1.19.4. It displayed docs for 1.19. (But maybe the tags in my copy of the repo are stale?) But also: I didn't ask it for
Yep. I did try |
I believe this is working as intended. CL 347549 only mentions speeding up serving stdlib by avoiding the full zip download. This use case was never supported. |
So... do we have a recommended way to test |
We should add support. As a workaround for now can you take these steps:
|
@jamalc I'm trying to submit some doc/example changes to the stdlib, and struggling with this issue as well. I've tried your workaround above of renaming the module, but I get an error HTTP 424 "This page is not supported by this datasource" when requesting
|
Interesting, its not loading any packages at startup. Does running without -list=false have the same result? |
Hmm, no, running without
|
I think this should work now after https://golang.org/cl/517915. You need to be in the GOROOT/src directory for it to work. It still takes a while to do the initial load of a page in the standard library but loads faster after the first are faster. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go
command in that GOROOT, run:What did you expect to see?
pkgsite
documentation for the version of thecontext
package in$GOROOT/src/context
.What did you see instead?
The local
pkgsite
displays documentation forgo1.19
, but claims that it comes from the repository at $(go env GOROOT).The text was updated successfully, but these errors were encountered: