cc @jba @golang/release
In go 1.25 "go doc -http" will go run a variant of pkgsite (golang.org/x/pkgsite/cmd/internal/doc) to serve documentation to be viewed in the browser. While this functionality isn't broken, there are some user experience issues that I discovered recently and would like to try to fix early in the freeze.
The first is that pkgsite tries to make some unnecessary network connections, such as to deps.dev, to show a link that is probably irrelevant to the user. When there's no network, this results in unwanted log messages. We'd like to disable these in the pkgsite variant.
There's also some unnecessary UI shown that clutters the page: namely the line under the name of the package or module that shows version information and the side bar on the right with information about the version of the module (which is usually invalid because the module the documentation is being shown for is a work module and not a dependency so we don't have full version information). We'd like to remove those in the pkgsite variant.
Making these changes would mean updating the pkgsite code in x/pkgsite to disable these features on the pkgsite variant. We'd then update the version used in the go run command to point to the commit that implements the changes.
This is a fairly low risk change because the pkgsite variant is not invoked unless the '-http' flag, which is new in 1.25, is passed to 'go doc', so it only affects users of the new feature.
Comment From: gabyhelp
Related Issues
- cmd/go: doc -http should start a pkgsite instance and open a browser #68106 (closed)
- cmd/doc: go doc -http fails with undownloaded modules #73833 (closed)
- x/pkgsite: improve pkgsite command #47780 (closed)
- proposal: x/tools/cmd/godoc: un-deprecate (or make pkgsite more compatible) #50229 (closed)
- x/pkgsite/cmd/pkgsite: remove most external dependencies #61399 (closed)
- x/pkgsite: Excluding private packages from external site lookups #55106
Related Code Changes
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Comment From: mknyszek
In the weekly release meeting, we don't think a freeze exception isn't really necessary. This seems within scope for the freeze (polishing new features). So... uh... approved?
Comment From: gopherbot
Change https://go.dev/cl/680176 mentions this issue: cmd/internal/doc: increase version of pkgsite doc command that's run