Skip to content

cmd/doc: fix some user experience issues with pkgsite instance started [freeze exception] #73848

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

Open
matloob opened this issue May 23, 2025 · 2 comments
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

Comments

@matloob
Copy link
Contributor

matloob commented May 23, 2025

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.

@gabyhelp gabyhelp added the ToolProposal Issues describing a requested change to a Go tool or command-line program. label May 23, 2025
@dmitshur dmitshur added this to the Go1.25 milestone May 23, 2025
@seankhliao seankhliao added the NeedsFix The path to resolution is known, but the work has not been done. label May 24, 2025
@mknyszek
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
Development

No branches or pull requests

5 participants