vscode-go icon indicating copy to clipboard operation
vscode-go copied to clipboard

When saving code, gopls is suspended and there is an error in OUTPUT

Open wubie052 opened this issue 1 year ago • 1 comments

What version of Go, VS Code & VS Code Go extension are you using?

Version Information
  • Run go version to get version of Go from the VS Code integrated terminal.
    • go 1.22.5
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
    • v0.16.2
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
  • Check your installed extensions to get the version of the VS Code Go extension
    • v0.42.1
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.

Share the Go related settings you have added/edited

{
    "workbench.colorTheme": "Default Dark Modern",
    "editor.quickSuggestionsDelay": 50,
    "editor.tabSize": 2,
    "todo-tree.general.tags": [
        "BUG",
        "HACK",
        "FIXME",
        "TODO",
        "XXX",
        "[x]"
    ],
    "telemetry.telemetryLevel": "error",
    "gitlens.outputLevel": "error",
    "go.toolsManagement.autoUpdate": true,
    "[proto3]": {
        "editor.defaultFormatter": "zxh404.vscode-proto3"
    },
    "[vue]": {
        "editor.defaultFormatter": "Vue.volar",
        "editor.tabSize": 2
    },
    "[javascript]": {
        "editor.tabSize": 2
    },
    "editor.indentSize": "tabSize"
}

Describe the bug

I saved the file but nothing happened after a long wait, so I checked OUTPUT->gopls(server)

[Error - 11:28:09 AM] Request textDocument/codeAction failed.
  Message: context canceled
  Code: 0 
[Error - 11:28:10 AM] 2024/09/24 11:28:10 imports fixes: allImportsFixes: D:\a1-PublisherAdvertisingPlatform\go-admin\common\three\oceanengine\oe_client_files.go:12:87: mixed named and unnamed parameters
	file="D:\\a1-PublisherAdvertisingPlatform\\go-admin\\common\\three\\oceanengine\\oe_client_files.go"

Steps to reproduce the behavior:

I saved the file but nothing happened after a long wait, so I checked OUTPUT->gopls(server)

[Error - 11:28:09 AM] Request textDocument/codeAction failed.
  Message: context canceled
  Code: 0 
[Error - 11:28:10 AM] 2024/09/24 11:28:10 imports fixes: allImportsFixes: D:\a1-PublisherAdvertisingPlatform\go-admin\common\three\oceanengine\oe_client_files.go:12:87: mixed named and unnamed parameters
	file="D:\\a1-PublisherAdvertisingPlatform\\go-admin\\common\\three\\oceanengine\\oe_client_files.go"

Screenshots or recordings

If applicable, add screenshots or recordings to help explain your problem.

wubie052 avatar Sep 24 '24 03:09 wubie052