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/cmd/gopls: fails on large projects #33221
Comments
Thank you for the detailed report! I think this error was the result of a fairly recent change - are you using |
This was probably fixed in https://go-review.googlesource.com/c/tools/+/186958, similar (but much faster) symptoms were reported in slack and this was the cl I put up to fix them, it fixed the issue for the reporter, and is now sumitted. If you could update to latest (any cl after 8bb11ff) and report back that would be helpful, thanks! |
@stamblerre Thanks! I think the version I had when reporting here was the one installed automatically by @ianthehat thanks! I've installed For reference I'm now on:
|
It is possible that VSCode installed from master rather than latest, so if you'd be willing to open an issue there - that'd be great. Thanks for reporting! |
After several days, gopls is still working in my editor without manual restarts which is something I've not seen for weeks so I'll close this and assume my issue was fixed by the CL you mentioned @ianthehat thanks! @stamblerre it does appear that vscode-go does install from master. This value is effectively passed as the argument to In my case updating to master actually solved the problem! I can see that |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
$GOPATH
gopls
(via VsCode extension)Relevant VSCode config:
I also happen to have
GO111MODULE=on
in ENV currently as I work with a few repos still in GOPATH but this one is NOT in my GOPATH so I assume this makes no difference as Consul has ago.mod
file.What did you expect to see?
Working Auto-completion, auto-imports, formatting, vet etc.
What did you see instead?
All the above work for a short period (anywhere from 1 minute to 20 mins) or so after restarting the lang server (by reinstalling it or
kill -9
thegopls
PIDs).After that the gopls output fills up with lines like this (hundreds of lines, distributed over some/all the files I have open in tabs)
Shortly after I start seeing those mixed with lots of lines like:
At this point none of the features work until I kill
gopls
again.After posting I realised that whenCode Helper
processes consumes some CPU (but not lots) when in this "hung" state but never seems to resolve even after hours of leaving computer idle. I'm not sure if this is onlygopls
.gopls
is working it shows up asgopls
in Activity Monitor so I my assumption thatCode Helper
CPU usage was representinggopls
is clearly off. In that casegopls
seems to be using virtually no CPU at all in its "hung" state.This project is pretty large and has a lot of large dependencies (thanks to cloud provider SDKs...) but when it's working
gopls
is very fast and doesn't seem to use a lot of CPU which makes it seem more "hung" than just working hard on lots of deps.History and Reproduction
This sounds a lot like the previous issue #31712 but in this case is reproducible for me on an OSS repo.
I've been using VSCode and gopls with current configuration for several months on this repository mostly successfully (several times it has broken and I've had to fiddle with config or something to get it to work but it was previously working). This has been failing in this way reproducibly for me for roughly 3-4 weeks (sorry can't be more precise as I've worked around it assuming it to be temporary for a while). I've tried lots of reconfiguring, upgrading etc. to no avail.
For other smaller libraries, my current configuration doesn't seem to have the same issue. So I assume it's related to the size of the project or some specific issue in one of the deps but have been unable to track down what that might be so far.
I hope this issue is useful as a reproducible case of something others have apparently seen intermittently too but couldn't give a good repro for.
The text was updated successfully, but these errors were encountered: