/ go Public
x/tools/gopls: core functionality does not work in vendor directories #53756
Issues related to support for modules or multi-module workspaces.
Issues related to the Go language server, gopls.
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
This label describes issues relating to any tools in the x/tools repository.
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 after
fmt.it does not yield valid candidates for completion of
fmt. 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
fmtin both files in both sessions in both directories.
What did you see instead?
The source in
~/git/vendor/enigmacurry/go-play/hello.godoes not offer valid completions.
The parent directory
~/git/vendorhosts many other repositories totaling 18GB, which may be a factor as this bug appears to be directory specific.
gopls is installed directly from the Arch Linux repository:
The text was updated successfully, but these errors were encountered: