-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: extremely long background refresh for goimports #42861
Comments
latest version of everything, everuthing up2date, macos catalina |
Have you taken a look at golang/vscode-go#236? Do you have any of those other extensions installed? |
Hello Rebecca, |
The first comment explains the different steps to try--this issue doesn't have one concrete solution, but can be caused by various issues. I would recommend trying to disable your other extensions to see if they are the cause. If that doesn't help, then please share a |
|
it happens time to time, not every time i save a file, previously is last traces when the "slow" action occured, if it can helps... |
I do see the slow code action request there, but it looks like this is a partial log, so I can't get a full understanding of the issue. Can you please share the complete log (starting from the top, you should see an "initialize" request) the next time this happens? |
I'm actually still not seeing the initialize request in that log. Maybe you could run |
it send me back just that. |
That looks correct, thanks for sharing that. To confirm, you are also opening VS Code with the root path of |
usually i do it from the terminal (iterm):
in this case :
|
Ok great, thanks for the confirmation. So it looks like your |
i will tell you, i have juste GO extension in my vscode right now, i uninstalled everything else. Thnaks. |
I don't know the reason yet either. It looks like it worked ok till the codeAction requests 11777 and 11778.
I see vscode is often issuing two of the same or similar kind of messages on the same file in parallel so I guess the same file was open side-by-side. @stamblerre Is there any useful http debug endpoint for @fkarakas to look into to check what gopls is up to? (for example, is it deadlocked? is there any stuck go commands? ...)
|
Hi @hyangah, still the same issue after disabling all plugins (except go ;) ), to day i reached my record:
no file open on the side, |
Thanks for sharing that. /cc'ing @heschik for input on why the background refresh might take so long |
There are hundreds of background refreshes in this log, and all but the last take less than 200ms. I don't know what happened at 4:10 AM, and there are no clues that I can find in the logs. But I see no reason to think the refresh is the cause of the problem, or a more significant symptom than all the cancelled requests at that time. I don't think logs are going to help here. |
@fkarakas: Do you see this issue frequently? Do you know what you are doing when you see it usually? (For example, are you refactoring code, moving files, etc.?) |
hello, it happens one or twice a day. My coworkers also got time to time this issue. One told me that after "formatting" its macbook, the issue was gone... another one reinstalled vscode from scratch, so i don't know if it can be helpful I am not moving file, refactoring yes, changing function parameter name etc ... Sorry to bother you with that, i don't really know if is my setup or really touchy corner case between vcode and gopls ? |
OK, please let us know if the problem persists or things improve. It's hard to understand how the problem here since it's not easily reproducible, so I think the best path forward would be if you can find a case where you can reproduce an issue consistently. When you see these errors again, I'd recommend checking your computer's Activity Monitor to see if As a workaround, when |
Closing this issue, as it's been in the Waiting for Info state for over a month. |
Please direct general questions to:
#vscode
channel in Gophers SlackPlease review the documentation before filing an issue.
Helpful pages include:
Please answer these questions before submitting your issue. Thanks!
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Gogopls -v version
to get version of Gopls if you are using the language server.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insidersgo env
to get the go development environment detailsShare the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
orgopls
prefixes.Describe the bug
A clear and concise description of what the bug.
A clear and concise description of what you expected to happen.
Steps to reproduce the behavior:
Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.
When saving a file, the popup stays for ever and i can't save the file:
Saving 'scheduler_test.go': Getting code actions from ''Go'' (configure).
After 15 mins perhaps, the file is saved
The text was updated successfully, but these errors were encountered: