-
Notifications
You must be signed in to change notification settings - Fork 769
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
saving file stuck: Saving 'xxxx.go': Getting code actions from ''Go'' #2687
Comments
We're working on a major redesign of gopls' internals that may improve this for you. However, would you be able to collect logs, so that we can see what's going on? |
I opened the gopls verbose log. Attchmentment is the log file after I change the file "aks-rp/fleet/pkg/log/log.go". This time the file was saved after 10 ~ 20 seconds. |
I see in the log that the initial workspace load ~68s, after which point things look pretty fast. Did you change the file shortly after opening your session? |
No, I didn't change the file after saving and waiting the save finish. |
Hi @vogtb: is that all you see in your logs? Can you please try starting gopls with EDIT: fixed a typo: the flag is |
Yeah, that's all the log says. I'll turn on tracing, but I'm not sure how much use it'll be since the gopls proc seems to be the one hanging. Will update again when I've got some logs to show. |
Trace logs don't show much. Just not getting any response from gopls. Just making changes, moving around in a document, and I'm getting no response back so vscode is just canceling the requests. Sample of the logs:
|
I wrote about this in #2727. Seems like I wasn't excluding some of my target directories in the |
I have the same issue as @mingqishao but I noticed that windows defender's antivirus service hogs all my cpu resources at the same time. I suspect it could be related |
same issue here, wired stuff, and without solution |
@linlih which version of gopls are you using? If you are on [email protected] or earlier, and on Mac, we fixed a major bug causing these symptoms in [email protected]. |
@findleyr I tried newest version and v0.9.4 still has this problem, i running this on linux server, and connect it through remote ssh. |
@linlih sorry for the slow response. Which version did you try? We believe this bug was fixed in [email protected]. Can you try |
Seems fixed. Thx ! |
This issue is because of the VS Code which is trying to set up your project but it couldn't find Do This fixes the issue |
I have the same issue. It is outrageous. 2024 and saving a files taking.... AGES :( |
@gameliee it looks like the extension is waiting for both "Go" and "GitHub Copilot Chat". I wonder if this could be Copilot taking a while? @kstoykov we believe that this issue was fixed a while ago. If you're still experiencing it, could you help us investigate, starting with the output of |
@findleyr I found a solution. Having |
@kstoykov thank you, that is useful information. |
@kstoykov Did you mean having |
@findleyr Yes, I meant |
I tried to update it, but it was still the old version after the update. I had shut down the running gopls : C:\Users\Admin>go install golang.org/x/tools/gopls@latest
C:\Users\Admin>gopls -v version
Build info
----------
golang.org/x/tools/gopls v0.16.2
golang.org/x/tools/[email protected] h1:K1z03MlikHfaMTtG01cUeL5FAOTJnITuNe0TWOcg8tM=
github.com/BurntSushi/[email protected] h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
github.com/google/[email protected] h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
golang.org/x/exp/[email protected] h1:2O2DON6y3XMJiQRAS1UWU+54aec2uopH3x7MAiqGW6Y=
golang.org/x/[email protected] h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
golang.org/x/[email protected] h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/[email protected] h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
golang.org/x/[email protected] h1:Wm3cG5X6sZ0RSVRc/H1/sciC4AT6HAKgLCSH2lbpR/c=
golang.org/x/[email protected] h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/[email protected] h1:6bJEg2w2kUHWlfdJaESYsmNfI1LKAZQi6zCa7LUn7eI=
golang.org/x/[email protected] h1:SP0mPeg2PmGCu03V+61EcQiOjmpri2XijexKdzv8Z1I=
honnef.co/go/[email protected] h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs=
mvdan.cc/[email protected] h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo=
mvdan.cc/xurls/[email protected] h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8=
go: go1.22.5 |
Still getting this issue, why was this closed? Makes Go development a nightmare because it takes 1+ minute to save a single file and could end up with some cache conflict if you try to edit any files before waiting for it to save, which forces you to use the confusing VS code interface for merge-conflict resolution. |
It seems that this problem only happened on Windows,i didn't got this problem on my Linux PC. |
Affecting me on M1 Mac as well. Literally unusable experience |
@TheOnlyWei has provided some debugging information in #3649, and we'll investigate. @Schachte is this a recent regression for you, or your initial experience with the extension? Clearly there's a bug here, but I want to understand if it is related to the environment, or a recent regression. |
Also seeing this on an M2 Mac. |
@themaxgoldman can you please also provide more information? Is this a recent regression? Can you try downgrading gopls to v0.16.2? Does this occur in a small workspace? Do you have any other diagnostics or messages in your session? |
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.Go: Locate Configured Go Tools
command.Share 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
This happen sometime. When I save the "xx.go" file, VSCode is stuck in "Saving 'xxxx.go': Getting code actions from ''Go''". Then the file will be saved after 60 second timeout.
I expected it save file fast instead of waiting for 60 seconds.
Steps to reproduce the behavior:
Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.
The text was updated successfully, but these errors were encountered: