cmd/doc: fix some user experience issues with pkgsite instance started [freeze exception] #73848
Labels
NeedsFix
The path to resolution is known, but the work has not been done.
ToolProposal
Issues describing a requested change to a Go tool or command-line program.
Milestone
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.
The text was updated successfully, but these errors were encountered: