x/tools/gopls: prefer dependencies from the go.mod when populating imports #45209
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
N/a.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Create an empty directory, initialize a new module there with
go init demo
Add dependency:
go get github.com/aws/aws-sdk-go-v2/aws
Open VS Code with Go extension that relies on gopls v0.6.9, and type the following:
Save the file, triggering gopls to fill the import section
What did you expect to see?
gopls uses the dependency from the go.mod:
What did you see instead?
gopls incorrectly populated imports with the
github.com/aws/aws-sdk-go/aws
package.gopls log from VS Code Problems view
The text was updated successfully, but these errors were encountered: