Skip to content

Go Companion hangs the extension host on code bases with a large number of tests #3785

@stevehipwell

Description

@stevehipwell

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.24.4 windows/amd64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
    • golang.org/x/tools/gopls v0.19.0-pre.3
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
    • 1.101.0
  • Check your installed extensions to get the version of the VS Code Go extension
    • 0.47.3
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.
# Tools Configuration


## Environment

GOBIN: undefined
toolsGopath: 
gopath: C:\Users\hipwells\go
GOROOT: C:\Users\hipwells\scoop\apps\go\current
PATH: C:\Program Files\OpenSSH\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\dotnet\;C:\Program Files\RedHat\Podman\;C:\Users\hipwells\AppData\Local\Programs\Python\Python313\Scripts\;C:\Users\hipwells\AppData\Local\Programs\Python\Python313;C:\Program Files\ServiceNow\agent-client-collector\bin;C:\Program Files\ServiceNow\agent-client-collector\embedded\bin;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7\;C:\Users\hipwells\scoop\apps\maven\current\bin;C:\Users\hipwells\go\bin;C:\Users\hipwells\scoop\apps\updatecli\current;C:\Users\hipwells\scoop\apps\gpg\current\bin;C:\Users\hipwells\scoop\apps\openssl\current\bin;C:\Users\hipwells\scoop\apps\gsudo\current;C:\Users\hipwells\scoop\apps\nvs\current;C:\Users\hipwells\scoop\shims;C:\Users\hipwells\AppData\Local\Microsoft\WindowsApps;C:\Users\hipwells\AppData\Local\Microsoft\WindowsApps;C:\Program Files\RedHat\Podman;C:\Users\hipwells\.dotnet\tools;C:\Users\hipwells\.dotnet\tools;C:\Users\hipwells\.dotnet\tools;C:\Users\hipwells\.dotnet\tools;C:\Users\hipwells\scoop\apps\nvs\current\nodejs\default;C:\Users\hipwells\.krew\bin;c:\users\hipwells\.local\bin;C:\Users\hipwells\.dotnet\tools

## Tools

	go:	C:\Users\hipwells\scoop\shims\go.exe: go version go1.24.4 windows/amd64

	gopls:	C:\Users\hipwells\go\bin\gopls.exe	(version: v0.19.0-pre.3 built with go: go1.24.4)
	gotests:	C:\Users\hipwells\go\bin\gotests.exe	(version: v1.6.0 built with go: go1.24.4)
	impl:	C:\Users\hipwells\go\bin\impl.exe	(version: v1.4.0 built with go: go1.24.4)
	goplay:	C:\Users\hipwells\go\bin\goplay.exe	(version: v1.0.0 built with go: go1.24.4)
	dlv:	C:\Users\hipwells\go\bin\dlv.exe	(version: v1.24.2 built with go: go1.24.4)
	golangci-lint-v2:	C:\Users\hipwells\go\bin\golangci-lint-v2.exe	(version: v2.1.6 built with go: go1.24.4)

## Go env

Workspace Folder (terraform-provider-shell): c:\Users\hipwells\Code\github.com\terr4m\terraform-provider-shell

	set AR=ar
	set CC=gcc
	set CGO_CFLAGS=-O2 -g
	set CGO_CPPFLAGS=
	set CGO_CXXFLAGS=-O2 -g
	set CGO_ENABLED=0
	set CGO_FFLAGS=-O2 -g
	set CGO_LDFLAGS=-O2 -g
	set CXX=g++
	set GCCGO=gccgo
	set GO111MODULE=
	set GOAMD64=v1
	set GOARCH=amd64
	set GOAUTH=netrc
	set GOBIN=
	set GOCACHE=C:\Users\hipwells\AppData\Local\go-build
	set GOCACHEPROG=
	set GODEBUG=
	set GOENV=C:\Users\hipwells\AppData\Roaming\go\env
	set GOEXE=.exe
	set GOEXPERIMENT=
	set GOFIPS140=off
	set GOFLAGS=
	set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\hipwells\AppData\Local\Temp\go-build1568407553=/tmp/go-build -gno-record-gcc-switches
	set GOHOSTARCH=amd64
	set GOHOSTOS=windows
	set GOINSECURE=
	set GOMOD=c:\Users\hipwells\Code\github.com\terr4m\terraform-provider-shell\go.mod
	set GOMODCACHE=C:\Users\hipwells\go\pkg\mod
	set GONOPROXY=
	set GONOSUMDB=
	set GOOS=windows
	set GOPATH=C:\Users\hipwells\go
	set GOPRIVATE=
	set GOPROXY=https://proxy.golang.org,direct
	set GOROOT=C:\Users\hipwells\scoop\apps\go\current
	set GOSUMDB=sum.golang.org
	set GOTELEMETRY=on
	set GOTELEMETRYDIR=C:\Users\hipwells\AppData\Roaming\go\telemetry
	set GOTMPDIR=
	set GOTOOLCHAIN=auto
	set GOTOOLDIR=C:\Users\hipwells\scoop\apps\go\current\pkg\tool\windows_amd64
	set GOVCS=
	set GOVERSION=go1.24.4
	set GOWORK=
	set 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.toolsManagement.autoUpdate": true,
  "[go]": {
    "editor.defaultFormatter": "golang.go"
  },
  "gopls": {
    "verboseOutput": false,
    "ui.semanticTokens": true
  },
  "go.lintTool": "golangci-lint-v2",
  "go.lintFlags": ["--path-mode=abs", "--fast-only"],
  "go.formatTool": "custom",
  "go.alternateTools": {
    "customFormatter": "golangci-lint-v2"
  },
  "go.formatFlags": ["fmt", "--stdin"],
  "go.testFlags": [],
  "go.testExplorer.showDynamicSubtestsInEditor": true,
  "go.diagnostic.vulncheck": "Imports",
  "go.enableCodeLens": {
    "runtest": false
  },
  "go.playground": {
    "openbrowser": false
  },

Describe the bug

I can't open large Go codebases in VS Code. Hover over intellisense always just shows Loading.... If I attempt to find references or use similar commands VS Code shows Activating extensions... in the bottom status bar and nothing happens.

I don't have this issue in small code bases.

I have the Go Companion extension (0.0.11) installed.

I've used go clean to remove all temporary files on my machine.

Steps to reproduce the behavior:

  1. Clone google/go-github
  2. Open in VS Code
  3. Attempt to use intellisense

Screenshots or recordings

N/A

Metadata

Metadata

Assignees

Labels

Go CompanionIssues relating to the Go Companion extension

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions