Skip to content

x/tools/gopls: GOPACKAGESDRIVER breaks telescope.builtin.lsp_definitions #69818

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

Closed
david-yan opened this issue Oct 8, 2024 · 2 comments
Closed
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@david-yan
Copy link

gopls version

Build info
----------
golang.org/x/tools/gopls v0.16.2
    golang.org/x/tools/[email protected] h1:K1z03MlikHfaMTtG01cUeL5FAOTJnITuNe0TWOcg8tM=
    github.com/BurntSushi/[email protected] h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
    github.com/google/[email protected] h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
    golang.org/x/exp/[email protected] h1:2O2DON6y3XMJiQRAS1UWU+54aec2uopH3x7MAiqGW6Y=
    golang.org/x/[email protected] h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
    golang.org/x/[email protected] h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
    golang.org/x/[email protected] h1:Wm3cG5X6sZ0RSVRc/H1/sciC4AT6HAKgLCSH2lbpR/c=
    golang.org/x/[email protected] h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
    golang.org/x/[email protected] h1:6bJEg2w2kUHWlfdJaESYsmNfI1LKAZQi6zCa7LUn7eI=
    golang.org/x/[email protected] h1:SP0mPeg2PmGCu03V+61EcQiOjmpri2XijexKdzv8Z1I=
    honnef.co/go/[email protected] h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs=
    mvdan.cc/[email protected] h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo=
    mvdan.cc/xurls/[email protected] h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8=
go: go1.22.6

go env

GO111MODULE='on'
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/david.yan/Library/Caches/go-build'
GOENV='/Users/david.yan/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/david.yan/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/david.yan/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/Cellar/[email protected]/1.22.6/libexec'
GOSUMDB='off'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/opt/homebrew/Cellar/[email protected]/1.22.6/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.6'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/david.yan/workspace/scio/go/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 -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/r9/0sk5y75s38xcp_7fgrd5pjzc0000gn/T/go-build3619110292=/tmp/go-build -gno-record-gcc-switches -fno-common'


### What did you do?

1. Followed the instructions at https://github.com/bazelbuild/rules_go/wiki/Editor-setup to setup protobuf support for Neovim using `gopls`. ([init.lua](https://github.com/bazelbuild/rules_go/wiki/Editor-setup) starting from kickstart.nvim)
2. Opened a project file and tried to use Go to Definition.

### What did you see happen?

Received the error: 

Error when executing textDocument/definition : no package metadata for file file:///Users/david.yan/workspace/...


### What did you expect to see?

Should have navigated to the function declaration. This works when [these lines](https://gist.github.com/david-yan/daaa1ecb148c380e38ee8dd0761ac84f#file-init-lua-L621-L633) are removed.

### Editor and settings

NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1727870382


### Logs

_No response_
@david-yan david-yan added gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. labels Oct 8, 2024
@gopherbot gopherbot added this to the Unreleased milestone Oct 8, 2024
@david-yan david-yan changed the title x/tools/gopls: GOPACKAGESDRIVER breaks go to definition x/tools/gopls: GOPACKAGESDRIVER breaks telescope.builtin.lsp_definitions Oct 8, 2024
@findleyr
Copy link
Member

Sorry, we don't support the bazel integration. Perhaps you should report this to rules_go?

@findleyr findleyr closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants