x/tools/gopls: core functionality does not work in vendor directories #53756
Labels
gopls/workspace
Issues related to support for modules or multi-module workspaces.
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 did you do?
I created a simple go program:
If I put the source code in the path
~/git/vendor/enigmacurry/go-play/hello.go
, using gopls to complete on line 8 directly afterfmt.
it does not yield valid candidates for completion offmt
. Instead, it gives me these completions:However, if I put the same source code in a different directory,
~/git/go-play/hello.go
, completion is working correctly:I have created two gopls debug logs:
~/git/vendor/enigmacurry/go-play/hello.go
(see lines 309-314)~/git/go-play/hello.go
(see lines 211-216)I have tested in a total of three environments:
All environments showed the same result. I have replicated the problem on two separate machines (Arch Linux and Manjaro).
What did you expect to see?
I expected to see valid completions of
fmt
in both files in both sessions in both directories.What did you see instead?
The source in
~/git/vendor/enigmacurry/go-play/hello.go
does not offer valid completions.The parent directory
~/git/vendor
hosts many other repositories totaling 18GB, which may be a factor as this bug appears to be directory specific.Build info
gopls is installed directly from the Arch Linux repository:
The text was updated successfully, but these errors were encountered: