x/tools/gopls: no completion/suggestion/linting working on large projects #66787
Labels
gopls
Issues related to the Go language server, gopls.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
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.22.1 linux/amd64
Run
gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-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.41.2
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
I did reset all go related settings in the editor after noticing first the first time completion
/suggestion/autoimport didn’t work. The remaining settings left (for those debug traces) are:
Note that I also tried adding
semantictokens
, but this didn’t improve anything.Describe the bug
On a large project (hello world completion works on the same machine), gopls/vscode extension stops suggesting anything. One of those is for instance https://github.com/ubuntu/authd, but it’s not limited to it on my setup.
In the following reproducible step, I’m trying to request completion from an App struct instance to get its field. This is the same for anything else (methods or functions completion), refactoring, auto importing…
Note that the project is successfully building. If I run
go build ./cmd/authd/
, there is no error and the binary is produced.I also tried to remove the gopls and go entire cache in my HOME directory, and having gopls rebuilt (then, with the default go version on the system, which is 1.21.3, which is autoupdate to 1.22.1 inside this project)
Steps to reproduce the behavior:
we have the surroundings lines:
Log recording start with the cursor after the last line
2. Type carriage return, then
a.
3. See that nothing is proposed, no field or methods of a.
The logs starting when I type a return carriage, then
a.
on line 49 (which is anApp
instance), expecting completion:Additional logs
Please find attached additional logs when opening the project.
open-project-traces.txt
The text was updated successfully, but these errors were encountered: