x/tools/gopls: organizeImports chooses wrong import with 20+ peer package imports #67022
Labels
gopls/imports
NeedsFix
The path to resolution is known, but the work has not been done.
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
go version
to get version of Go from the VS Code integrated terminal.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 InsidersGo: Locate Configured Go Tools
command.Share the Go related settings you have added/edited
Describe the bug
I type
client.Client
and "client" is up to now not known.I hit ctrl-s, and somehow this import gets added:
This makes no sense. Nowhere in my code base do I import that.
I want that:
There are more than 20 imports of that package.
Why does the "auto-add import on save" feature not check the list of common imports of my code?
The text was updated successfully, but these errors were encountered: