Skip to content
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

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

Open
Tiper-In-Github opened this issue Sep 24, 2024 · 2 comments
Open
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@Tiper-In-Github
Copy link

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.

@gopherbot gopherbot added this to the Untriaged milestone Sep 24, 2024
@hyangah
Copy link
Contributor

hyangah commented Sep 25, 2024

@Tiper-In-Github thanks for reaching out. Do you see a pending progress popup? If so, can you share the full gopls log with us? Thanks!

The second error (fixes: allImportsFixes...) is as expected - that is an error in the code and cannot be fixed with the imports.

@hyangah hyangah added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Sep 25, 2024
@Tiper-In-Github
Copy link
Author

I'm sorry, I think I provided all the output related to the error when the problem occurred. There is no more information above what I provided, of course, it may be that I misread it.
If this problem comes up next time, I will add it. Thank you for everything you do for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants