-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: progress notifications for more operations #71751
Comments
Thanks. I think it is generally reasonable to start progress notifications after a delay, for any operation that could take a long time. In this case, we may want to look into what's taking so long, but we'd welcome a contribution similar to the PR you shared in slack. |
^ the above is a .prof file, (wouldn't let me drop it in as .prof) |
https://github.com/golang/tools/blob/master/gopls/internal/golang/implementation.go#L175 |
Thank you, @angles-n-daemons. Can you run |
|
This is for the CockroachDB repo (edit, this command was run from within the repo): |
Seems like at the highest level, we'd need to emit progress reports at the I can pass a reporter down from I could also embed a reporter on the Context, but there's a lack of type safety there. Do you have any thoughts on this? |
Sorry for the delayed response. Let's start by
It's not the type safety that makes me hesitant to stash on the Context--I'm sure we'd catch any bug related to mismatching context. Rather, it's the fact the presence of a tracker affects the behavior of the operation. It would be too easy to pass the context to some other suboperation of |
Perfect, yeah that makes sense - I'll try to have some draft out by this week. |
gopls version
Build info
command-line-arguments (unknown)
@
github.com/BurntSushi/toml@v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs=
github.com/google/go-cmp@v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/kr/pretty@v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/text@v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/rogpeppe/go-internal@v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/ryboe/q@v1.0.24 h1:GgnsKqyULXRp6fw9gZOO3ZEsBHmsFVampM1TLWw9uvU=
golang.org/x/exp/typeparams@v0.0.0-20241210194714-1829a127f884 h1:1xaZTydL5Gsg78QharTwKfA9FY9CZ1VQj6D/AZEvHR0=
golang.org/x/mod@v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM=
golang.org/x/sync@v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
golang.org/x/telemetry@v0.0.0-20241220003058-cc96b6e0d3d9 h1:L2k9GUV2TpQKVRGMjN94qfUMgUwOFimSQ6gipyJIjKw=
golang.org/x/text@v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
golang.org/x/tools@v0.28.0 => ../
golang.org/x/tools/gopls@(devel)
golang.org/x/vuln@v1.1.3 h1:NPGnvPOTgnjBc9HTaUx+nj+EaUYxl5SJOWqaDYGaFYw=
honnef.co/go/tools@v0.5.1 h1:4bH5o3b5ZULQ4UrBmP+63W9r7qIkqJClEA9ko5YKx+I=
mvdan.cc/gofumpt@v0.7.0 h1:bg91ttqXmi9y2xawvkuMXyvAA/1ZGJqYAEGjXuP0JXU=
mvdan.cc/xurls/v2@v2.5.0 h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8=
go: go1.24.0
go env
What did you do?
Slowness can be reproduced against the CockroachDB repo, using goto implementation:
What did you see happen?
Goto Implementation can take a long time, even on a warm server.
What did you expect to see?
It's not that I think goto implementation should execute faster, but for operations which take a long time, I would expect progress notifications to be sent, so that there's an indicator that gopls is working on my request.
Original request here: https://gophers.slack.com/archives/CJZH85XCZ/p1739487184239879
Editor and settings
Editor is neovim. Lack of progress notifications on slow requests should be observable for all gopls integrations however.
Logs
No response
The text was updated successfully, but these errors were encountered: