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/internal/lsp: log debug server port in the gopls log file, not stderr #33324

Closed
stamblerre opened this issue Jul 27, 2019 · 6 comments
Closed

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 27, 2019

Because debug.Serve gets called before we get an initialize request, we log to stderr instead of the log.

@gopherbot gopherbot added this to the Unreleased milestone Jul 27, 2019
@gopherbot gopherbot added the gopls label Jul 27, 2019
@stamblerre stamblerre added NeedsInvestigation and removed gopls labels Jul 27, 2019
@gopherbot gopherbot added the gopls label Jul 27, 2019
@ianthehat

This comment has been minimized.

Copy link

@ianthehat ianthehat commented Jul 28, 2019

Yeah, this came up when talking to Billie.
The idea is that we should enable debug pages by default, but to do that we need to default to :0 so they get unique ports, and that means we need an easy way of finding out what port it picked, and ideally the plugin would be able to find out so that it can just open the debug page.
It is probably worth noting that we could pick other ways of reporting the port number chosen for this purpose.

@stamblerre stamblerre modified the milestones: Unreleased, gopls unplanned Dec 4, 2019
@stamblerre

This comment has been minimized.

Copy link
Contributor Author

@stamblerre stamblerre commented Jan 29, 2020

@bhcleek: If I recall correctly, you sent out a CL for this, right? Is this still an issue for you?

@stamblerre stamblerre modified the milestones: gopls unplanned, gopls/v1.0.0 Jan 29, 2020
@bhcleek

This comment has been minimized.

Copy link
Contributor

@bhcleek bhcleek commented Jan 29, 2020

My CL, https://go-review.googlesource.com/c/tools/+/211798, was merged. I'll verify it's still working on the pending release, golang.org/x/tools/gopls@v0.3.0-pre2, tonight and will report back.

@stamblerre

This comment has been minimized.

Copy link
Contributor Author

@stamblerre stamblerre commented Jan 29, 2020

Perfect, thank you!

@bhcleek

This comment has been minimized.

Copy link
Contributor

@bhcleek bhcleek commented Jan 30, 2020

v0.3.0-pre2 outputs the port as expected.

@stamblerre

This comment has been minimized.

Copy link
Contributor Author

@stamblerre stamblerre commented Jan 30, 2020

Thanks for confirming! Closing this issue then.

@stamblerre stamblerre closed this Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.