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

outdated golangci-lint defaultVersion causes memory leak #2654

Closed
LAShZ opened this issue Feb 8, 2023 · 1 comment
Closed

outdated golangci-lint defaultVersion causes memory leak #2654

LAShZ opened this issue Feb 8, 2023 · 1 comment

Comments

@LAShZ
Copy link

LAShZ commented Feb 8, 2023

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.
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
  • 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
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.

go version go1.20 darwin/arm64

Share the Go related settings you have added/edited

{
  "[go]": {
      "breadcrumbs.showInterfaces": true,
      "breadcrumbs.showConstructors": true,
      "editor.insertSpaces": false,
      "editor.formatOnSave": true,
      "editor.codeActionsOnSave": {
          "source.organizeImports": true
      },
      "editor.suggest.snippetsPreventQuickSuggestions": false
  },
  "go.lintTool": "golangci-lint",
  "go.toolsManagement.autoUpdate": true
}

Describe the bug

As go has release go1.20, there is some memory leak bugs in go lint tool golangci-lint when using go1.20, and the problem has been fixed in golangci-lint v1.51.0). (Related issues: golangci/golangci-lint#3565). But the defaultVersion of golangci-lint in vscode-go is still v1.50.1, so when using vscode-go extension with go1.20, and choose linter as golangci-lint, the memery consumed by golangci-lint will be horrible.

Steps to reproduce the behavior:

  1. Upgrade go version to 1.20
  2. set "go.lintTool": "golangci-lint"in vscode settings
  3. edit some go code
  4. wait for the memory consumed by golangci-lint slowly grows

Screenshots or recordings

image

@gopherbot gopherbot added this to the Untriaged milestone Feb 8, 2023
@LAShZ LAShZ changed the title outdated golangci-lint defaultVersion version causes memory leak outdated golangci-lint defaultVersio causes memory leak Feb 9, 2023
@suzmue suzmue modified the milestones: Untriaged, v0.38.0 Feb 9, 2023
@LAShZ LAShZ changed the title outdated golangci-lint defaultVersio causes memory leak outdated golangci-lint defaultVersion causes memory leak Feb 10, 2023
@gopherbot
Copy link
Collaborator

Change https://go.dev/cl/469917 mentions this issue: src/goToolsInformation: update version golangci-lint and gopls

@golang golang locked and limited conversation to collaborators Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants