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

x/tools/gopls: find all references works only in a single package #32869

Open
anjmao opened this issue Jul 1, 2019 · 5 comments

Comments

Projects
None yet
5 participants
@anjmao
Copy link

commented Jul 1, 2019

What version of Go are you using (go version)?

[Info  - 3:24:12 PM] Build info
----------
golang.org/x/tools/cmd/gopls v0.1.1-cmd.gopls
    golang.org/x/tools@(devel)
    golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=

Go info
-------
go version go1.12.6 darwin/amd64

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/anjmao/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/anjmao/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/anjmao/s/hugo/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/jc/q8b4yjwd5dvgc42xpg6yvm8c0000gn/T/go-build904784213=/tmp/go-build -gno-record-gcc-switches -fno-common"

Does this issue reproduce with the latest release?

Yes

What did you do?

In Vscode I used Find All References.

What did you expect to see?

See all usages.

What did you see instead?

I see usages only in the file in which objects are defined.

@gopherbot gopherbot added this to the Unreleased milestone Jul 1, 2019

@gopherbot gopherbot added the gopls label Jul 1, 2019

@suzmue

This comment has been minimized.

Copy link
Contributor

commented Jul 1, 2019

Could you provide more information about this issue? Does this happen with all identifiers or only certain ones?

@suzmue

This comment has been minimized.

Copy link
Contributor

commented Jul 1, 2019

Find all references only supports in package references right now, so if the uses are in a different package, it will not be able to find them.

@anjmao

This comment has been minimized.

Copy link
Author

commented Jul 2, 2019

@suzmue Yes it works only in a single package, thanks. Maybe it make sense to link this issue to gopls wiki Known Issues as this behaviour is a bit confusing.

@arthurkiller

This comment has been minimized.

Copy link

commented Jul 2, 2019

same as me

@suzmue suzmue changed the title x/tools/cmd/gopls: find all references works only in a single file x/tools/cmd/gopls: find all references works only in a single package Jul 2, 2019

@stamblerre stamblerre changed the title x/tools/cmd/gopls: find all references works only in a single package x/tools/gopls: find all references works only in a single package Jul 2, 2019

@jadekler

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2019

Also seeing this (see: microsoft/vscode-go#2665)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.