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

"Getting code actions from 'Go'" dialog takes a very long time

Open bitlux opened this issue 3 months ago • 11 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 version go1.25rc1 linux/amd64
  • 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.
    • 1.103.1
      360a4e4fd251bfce169a4ddf857c7d25d1ad40da
      x64
      
  • Check your installed extensions to get the version of the VS Code Go extension
    • 0.50.0
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.
    • # Tools Configuration
      
      
      ## Environment
      
      GOBIN: undefined
      toolsGopath: 
      gopath: /home/abender/go
      GOROOT: /home/abender/Adam/projects/go.googlesource.com/go
      PATH: /home/abender/Adam/projects/go.googlesource.com/go/bin:/home/abender/.vscode-server/bin/360a4e4fd251bfce169a4ddf857c7d25d1ad40da/bin/remote-cli:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/abender/google-cloud-sdk/bin:/usr/local/go/bin:/home/abender/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/iCLS/:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/iCLS/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/WiFi/bin/:/mnt/c/Program Files/Common Files/Intel/WirelessCommon/:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/Go/bin:/mnt/c/Users/Adam/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/Adam/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/Adam/go/bin:/snap/bin
      PATH (vscode launched with): /home/abender/.vscode-server/bin/360a4e4fd251bfce169a4ddf857c7d25d1ad40da/bin/remote-cli:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/abender/google-cloud-sdk/bin:/usr/local/go/bin:/home/abender/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/iCLS/:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/iCLS/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/WiFi/bin/:/mnt/c/Program Files/Common Files/Intel/WirelessCommon/:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/Go/bin:/mnt/c/Users/Adam/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/Adam/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/Adam/go/bin:/snap/bin
      
      ## Tools
      
        go:	/home/abender/Adam/projects/go.googlesource.com/go/bin/go: go version devel go1.25-ba7b8ca336 Mon Apr 14 15:10:49 2025 -0700 linux/amd64
      
        gopls:	/home/abender/go/bin/gopls	(version: v0.19.1 built with go: go1.25rc1)
        gotests:	not installed
        impl:	not installed
        goplay:	not installed
        dlv:	not installed
        staticcheck:	/home/abender/go/bin/staticcheck	(version: v0.6.1 built with go: go1.25rc1)
      
      ## Go env
      
      Workspace Folder (bitlux): /home/abender/Adam/projects/github.com/bitlux
      
        AR='ar'
        CC='gcc'
        CGO_CFLAGS='-O2 -g'
        CGO_CPPFLAGS=''
        CGO_CXXFLAGS='-O2 -g'
        CGO_ENABLED='1'
        CGO_FFLAGS='-O2 -g'
        CGO_LDFLAGS='-O2 -g'
        CXX='g++'
        GCCGO='gccgo'
        GO111MODULE=''
        GOAMD64='v1'
        GOARCH='amd64'
        GOAUTH='netrc'
        GOBIN=''
        GOCACHE='/home/abender/.cache/go-build'
        GOCACHEPROG=''
        GODEBUG=''
        GOENV='/home/abender/.config/go/env'
        GOEXE=''
        GOEXPERIMENT=''
        GOFIPS140='off'
        GOFLAGS=''
        GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3228901456=/tmp/go-build -gno-record-gcc-switches'
        GOHOSTARCH='amd64'
        GOHOSTOS='linux'
        GOINSECURE=''
        GOMOD='/dev/null'
        GOMODCACHE='/home/abender/go/pkg/mod'
        GONOPROXY=''
        GONOSUMDB=''
        GOOS='linux'
        GOPATH='/home/abender/go'
        GOPRIVATE=''
        GOPROXY='https://proxy.golang.org,direct'
        GOROOT='/home/abender/Adam/projects/go.googlesource.com/go'
        GOSUMDB='sum.golang.org'
        GOTELEMETRY='local'
        GOTELEMETRYDIR='/home/abender/.config/go/telemetry'
        GOTMPDIR=''
        GOTOOLCHAIN='auto'
        GOTOOLDIR='/home/abender/Adam/projects/go.googlesource.com/go/pkg/tool/linux_amd64'
        GOVCS=''
        GOVERSION='devel go1.25-ba7b8ca336 Mon Apr 14 15:10:49 2025 -0700'
        GOWORK=''
        PKG_CONFIG='pkg-config'
      
      

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"] or gopls prefixes.

    "go.formatTool": "goimports",
    "go.toolsManagement.autoUpdate": true,
    "go.toolsEnvVars": {
        //        "GOTOOLCHAIN": "local"
    },
    "go.alternateTools": {
        "go": "/home/abender/Adam/projects/go.googlesource.com/go/bin/go",
    },

Describe the bug

Frequently, whenever I try to save a Go file, a dialog with the text "Getting code actions from 'Go'" will appear and sit there for several minutes. The file is not saved in the meantime.

Screenshots or recordings

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

Image

bitlux avatar Sep 11 '25 01:09 bitlux