Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find any implementations by interface #3566

Open
imqishi opened this issue Oct 15, 2024 · 1 comment
Open

cannot find any implementations by interface #3566

imqishi opened this issue Oct 15, 2024 · 1 comment
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@imqishi
Copy link

imqishi commented Oct 15, 2024

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.0 linux/amd64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
    • Build info

golang.org/x/tools/gopls v0.16.2
golang.org/x/tools/gopls@v0.16.2 h1:K1z03MlikHfaMTtG01cUeL5FAOTJnITuNe0TWOcg8tM=
github.com/BurntSushi/toml@v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
github.com/google/go-cmp@v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
golang.org/x/exp/typeparams@v0.0.0-20221212164502-fae10dda9338 h1:2O2DON6y3XMJiQRAS1UWU+54aec2uopH3x7MAiqGW6Y=
golang.org/x/mod@v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
golang.org/x/sync@v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/telemetry@v0.0.0-20240829154258-f29ab539cc98 h1:Wm3cG5X6sZ0RSVRc/H1/sciC4AT6HAKgLCSH2lbpR/c=
golang.org/x/text@v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/tools@v0.22.1-0.20240829175637-39126e24d653 h1:6bJEg2w2kUHWlfdJaESYsmNfI1LKAZQi6zCa7LUn7eI=
golang.org/x/vuln@v1.0.4 h1:SP0mPeg2PmGCu03V+61EcQiOjmpri2XijexKdzv8Z1I=
honnef.co/go/tools@v0.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs=
mvdan.cc/gofumpt@v0.6.0 h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo=
mvdan.cc/xurls/v2@v2.5.0 h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8=
go: go1.22.0

  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.

    • 1.94.2
      384ff7382de624fb94dbaf6da11977bba1ecd427
      x64
  • Check your installed extensions to get the version of the VS Code Go extension

    • v0.42.1
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.

    • Tools Configuration

Environment

GOBIN: /usr/local/go/bin
toolsGopath: /root/go
gopath: /root/go
GOROOT: /usr/local/go
PATH: /root/.vscode-server/cli/servers/Stable-384ff7382de624fb94dbaf6da11977bba1ecd427/server/bin/remote-cli:/root/.nvm/versions/node/v16.20.2/bin:/usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/.ft:/root/bin:/usr/local/go/bin:/root/.ft:/root/bin:/usr/local/go/bin

Tools

go:	/usr/local/go/bin/go: go version go1.22.0 linux/amd64

gopls:	/root/go/bin/gopls	(version: v0.16.2 built with go: go1.22.0)
gotests:	/root/go/bin/gotests	(version: v1.6.0 built with go: go1.22.0)
gomodifytags:	/root/go/bin/gomodifytags	(version: v1.17.0 built with go: go1.22.0)
impl:	/root/go/bin/impl	(version: v1.4.0 built with go: go1.22.0)
goplay:	/root/go/bin/goplay	(version: v1.0.0 built with go: go1.22.0)
dlv:	/root/go/bin/dlv	(version: v1.23.1 built with go: go1.22.0)
staticcheck:	/root/go/bin/staticcheck	(version: v0.5.1 built with go: go1.22.8)

Go env

Workspace Folder (backend): /root/code/backend

GO111MODULE=''
GOARCH='amd64'
GOBIN='/usr/local/go/bin'
GOCACHE='/root/.cache/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/root/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/root/go'
GOPRIVATE=''
GOPROXY='https://nickqi:vNChRMuQ@goproxy.woa.com,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.woa.com+643d7a06+Ac5f5VOC4N8NUXdmhbm8pZSXIWfhek5JSmWdWrq7pLX4'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.0'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/root/code/backend/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1187155729=/tmp/go-build -gno-record-gcc-switches'

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] or gopls prefixes.

I use remote development
In data.Machine:
"go.testFlags": [
"-gcflags=all=-l"
],
"go.toolsEnvVars": {
"GOBIN": "/usr/local/go/bin"
},
"go.inferGopath": true,
"go.gopath": "/root/go",
"go.toolsGopath": "/root/go"

Describe the bug

an interface and it's implementation in same file, but cannot find any implementation by interface

Steps to reproduce the behavior:

use command + click interface name or interface method name there is nothing happend.
use right click and select Find all implementations get empty list.

@imqishi imqishi changed the title cannot find any implementation by interface cannot find any implementations by interface Oct 15, 2024
@gopherbot gopherbot added this to the Untriaged milestone Oct 15, 2024
@findleyr
Copy link
Contributor

Thanks for the report. Right clicking and finding all implementations should definitely work. Can you share a minimal file that reproduces the bug for you?

@ansaba ansaba added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants