You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vim-go uses guru for :Godef. This doesn’t seem to work for looking up definitions in dependencies that have been downloaded as modules. For instance I can go to a definition and it will take me into the specific file in that dependency (e.g. ~/go/pkg/mod/golang.org/x/oauth2@v0.0.0-20181203162652-d668ce993890/oauth2.go). :GoDef within that file works, but jumping to a definition in the same package in a different file does not work (e.g. :GoDef on Token says vim-go: guru: no object for identifier)
:GoDef on oauth2.Config, then from oauth2.go use :GoDef on TokenSource (this works), then use :GoDef on Token. This gives the error: vim-go: guru: no object for identifier.
What did you expect to see?
I expected to be taken to the definition of Token in ~/go/pkg/mod/golang.org/x/oauth2@v0.0.0-20181203162652-d668ce993890/token.go
What did you see instead?
The error: vim-go: guru: no object for identifier.
Does this issue reproduce with the latest release (go1.11.4)?
Yes I also tested with go1.11.4 and the same error occurs.
System details
go version go1.12beta1 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/vout/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/vout/go"
GOPROXY=""
GORACE=""
GOROOT="/Users/vout/sdk/go1.12beta1"
GOTMPDIR=""
GOTOOLDIR="/Users/vout/sdk/go1.12beta1/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOROOT/bin/go version: go version go1.12beta1 darwin/amd64
GOROOT/bin/go tool compile -V: compile version go1.12beta1
uname -v: Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:31 PST 2018; root:xnu-4903.231.4~1/RELEASE_X86_64
ProductName: Mac OS X
ProductVersion: 10.14.2
BuildVersion: 18C52a
lldb --version: lldb-1000.0.38.2
Swift-4.2
The text was updated successfully, but these errors were encountered:
What did you do?
vim-go uses guru for
:Godef
. This doesn’t seem to work for looking up definitions in dependencies that have been downloaded as modules. For instance I can go to a definition and it will take me into the specific file in that dependency (e.g.~/go/pkg/mod/golang.org/x/oauth2@v0.0.0-20181203162652-d668ce993890/oauth2.go
).:GoDef
within that file works, but jumping to a definition in the same package in a different file does not work (e.g.:GoDef
onToken
saysvim-go: guru: no object for identifier
)Here's an example repo as a jumping off point:
https://github.com/voutasaurus/oauthtest/tree/2aac50ff8003ec8f56ac1f71f78efc00cd130a97
The file:
https://github.com/voutasaurus/oauthtest/blob/2aac50ff8003ec8f56ac1f71f78efc00cd130a97/cmd/web/main.go
Use existing go.mod in the repo.
:GoDef
onoauth2.Config
, then from oauth2.go use:GoDef
onTokenSource
(this works), then use:GoDef
onToken
. This gives the error:vim-go: guru: no object for identifier
.What did you expect to see?
I expected to be taken to the definition of Token in
~/go/pkg/mod/golang.org/x/oauth2@v0.0.0-20181203162652-d668ce993890/token.go
What did you see instead?
The error:
vim-go: guru: no object for identifier
.Does this issue reproduce with the latest release (go1.11.4)?
Yes I also tested with go1.11.4 and the same error occurs.
System details
The text was updated successfully, but these errors were encountered: