Skip to content
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

x/tools/gopls: combine -debug HTTP server and product (doc, asm, free symbols) web server #68229

Open
adonovan opened this issue Jun 28, 2024 · 2 comments
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@adonovan
Copy link
Member

It is unnecessary that gopls creates two HTTP servers, one for debugging and one for the "product" (as used by the doc, assembly, and free-symbols code actions). We should combine them, and also start the combined server early, during startup (reducing the need for later error handling).

@findleyr suggests that if the user provides a -debug flag, we should use that for the combined server instead of the ephemeral random port + secret endpoint that we currently use.

@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Jun 28, 2024
@gopherbot gopherbot added this to the Unreleased milestone Jun 28, 2024
@findleyr
Copy link
Member

To summarize, here are reasons to do this:

  1. Persistent links for interacting with gopls across sessions.
  2. Earlier error handling if the web server can't be started.
  3. Improved discoverability of debugging features.

The last is a bit nebulous: our current -debug pages are rather thrown-together out of expedience: we needed to be able to interrogate Views, memory usage, traces, and pprof output. If we combine this in a common nav with product facing features, I'm very much imagining a more polished dashboard. While that would be a fun project, it probably has low impact on most users, so is a bit hard to justify. Nevertheless, it's something I've wanted for a while, so may do as a side project.

Final thought: if we do this we should consider deprecating the -debug flag in favor of something like -http.

@findleyr findleyr modified the milestones: Unreleased, gopls/backlog Jun 28, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/607015 mentions this issue: jwt: rename ExampleJWTConfig to ExampleConfig to avoid vet error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants