-
Notifications
You must be signed in to change notification settings - Fork 646
Saving is very slow because waiting for "Quick Fixes" [flaky] #3063
Comments
Looks like it does complete eventually (~20 seconds) |
This is a variation of the issue discussed in #90851 and many more. VS Code 1.42 dropped the cancellation-based approach https://code.visualstudio.com/updates/v1_42#_handling-slow-save-operations and which made this problem more visible. This may be due to slow microsoft/vscode#90851 (comment) shows how to enable and capture more logging. Can you try it so we have a bit more info on what's going on? Thanks!
|
OK, log levels increased. When saving is slow again (it's fast right now) I'll add the logs here. |
I started experiencing these symptoms after upgrading to 42.1 this morning. Downgrading to 41.1 seems to have resolved it for me.
Edit: sorry, seems like this is clear from the note about 42.1 above. |
Same problem here. After downgrading to 41.1 I can at least save files but the Golang support does not seem to be working in fairly big projects neither. Also using Linux. |
I think I have an idea of what's going on, and I expect that #3064 will provide at least some part of the fix. The CodeActionContext.Only field is not being propagated to |
If anyone is willing to try debugging this a bit further, I just published https://github.com/stamblerre/vscode-go/releases/tag/v0.3, which is a version of the extension with all of the latest dependencies. Please give it a try and report here if "Running save participants..." is still an issue. You can install it with the following steps:
|
I am having this issue pretty consistently. I'm attaching trace logs from a recent incident - hopefully that may help. |
@pequalsnp: Are you using |
@stamblerre Yes, I am using gopls. I've got the trace logs from that, I'm attaching them. |
Thanks for sharing those logs! I think the main issue in your case is this error:
|
Related to microsoft/vscode-go#3063. A small collection of fixes: (1) Don't reload packages with missing dependencies unless imports change. (2) Show the error message from the initial workspace load to the user. Also, a small fix for deletion suggested fixes - upgrading to the latest version of the VS Code language client revealed that I had made a mistake there. Change-Id: I7ab944ed27dc3da24a79d5d311531a1eb2b73102 Reviewed-on: https://go-review.googlesource.com/c/tools/+/221217 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
I forgot to mention that there is a new command: "File: Save Without Formatting", (alt+k, s) which bypasses formatting and code action. |
I'm seeing this error as well in a go codebase using bazel, probably because |
@pcj: |
Are people still having this issue? If so, can you please comment here and attach your |
Here the output log is
repeated x10 I took a while to get in this state again, is not a 'everytime' bug |
It seems simply |
@stamblerre hi - I've been experiencing slowness for months, but today decided to actually look at the logs 😉 This seems to be happening in particular with private packages - I usually export I've sanitized the entry, but basically I see this message over and over until it times out:
LMK if that's helpful or if you need more information. This is with
And VSCode:
|
I think you will need to reload the vscode or restart gopls. You can check the gopls log to see what Go environment variable it is using (the info should be at the beginning of the gopls log. |
oh! thanks @hyangah - yes that works. Is this documented somewhere? |
I am having this problem in 1.43 and 1.44 so working with Go is broken for months now, very frustrating. Enabling/disabling gopls makes no difference. Either gopls gets stuck at 100% cpu utilization until some timeout or code running non gopls tools. Setting go.toolsEnvVars GOPRIVATE to match my terminal environment also does not make any difference. All go tools are at the latest version, but this never made any difference for this problem. |
Found it in the logs: the aleksandra.go-group-imports extension was the problem. Working fine after disable and restart. |
Because there have been a number of issues filed about this bug, I've tried to consolidate the details in to #3179. I'm going to close this in favor of that issue. |
Duplicate of #3179 |
Issue Type: Bug
Observe:
Quick Fixes doesn't complete (sometimes, this seems flaky)
Can't find anything relevant in the Go extension output
Extension version: 0.13.0
VS Code version: Code 1.42.1 (c47d83b293181d9be64f27ff093689e8e7aed054, 2020-02-11T14:44:27.652Z)
OS version: Darwin x64 18.7.0
Remote OS version: Linux x64 5.2.17-1rodete3-amd64
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: