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: context deadline exceeded with windows 10 wsl2 #49475
Comments
IIRC the |
Yes, I can't find any options with gopls timeout. |
I am afraid timeout longer than 10min is not ideal - according to the trace, the loading failed after more than 10min.
I think for wsl, VS Code recommends Visual Studio Code Remote - WSL extension than starting with the |
@wu0407 Can you please check if you have the same issue when you use the WSL extension? |
same result with wsl extention start wsl and manual start wsl. @hyangah |
IIRC gopls has to read something like 25K files and load 3-6GB of memory for Kubernetes (depending on if you're using staticcheck). This takes 30-45s on my (rather powerful) linux desktop. I am not at all surprised to hear that gopls is unusable at such scale on WSL2. We are considering a project to allow gopls to avoid loading the entire workspace for projects like Kubernetes, hopefully for early 2022. In the meantime, gopls will not work well for this use case, sorry. I'm going to leave this in the backlog, so that we may find it while working on performance (and hopefully verify that it is improved). |
The project mentioned above is complete, and tentatively released in gopls@v0.12.0-pre.1. Please try it out to see if it helps. In the meantime, I am going to close this bug as timed-out. Please comment if you are still having issues. |
Hi @findleyr, I'm facing the same issue with the following env:
I'm also using the |
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?
Open kubernetes code in use vscode with wsl mode.
go extention report "go.mod context deadline exceeded"
I see gopls use many cpu a few time, then low cpu and memory not increase.
What did you expect to see?
no probelm
What did you see instead?
###gopls trace log on local vscode
###full log:
gopls-wsl-context-timeout.txt
The text was updated successfully, but these errors were encountered: