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/cmd/gopls: no CheckPackageHandles error when calling Definition #34131

Closed
myitcv opened this issue Sep 5, 2019 · 8 comments
Closed

x/tools/cmd/gopls: no CheckPackageHandles error when calling Definition #34131

myitcv opened this issue Sep 5, 2019 · 8 comments

Comments

@myitcv
Copy link
Member

@myitcv myitcv commented Sep 5, 2019

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

$ go version
go version devel +9da7abd2eb Tue Sep 3 18:35:32 2019 +0000 linux/amd64
$ go list -m golang.org/x/tools
golang.org/x/tools v0.0.0-20190905221716-4f238b926e10
$ go list -m golang.org/x/tools/gopls
golang.org/x/tools/gopls v0.1.4-0.20190905221716-4f238b926e10

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/myitcv/.cache/go-build"
GOENV="/home/myitcv/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/myitcv/gostuff"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/myitcv/gos"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/myitcv/gos/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/myitcv/gostuff/src/github.com/myitcv/govim/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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build208684794=/tmp/go-build -gno-record-gcc-switches"

What did you do?

This is a follow up to #34103 (comment)

We have started to see functional failures as a result of 'no CheckPackageHandles' errors. In this case we were running a test that verifies the behaviour of Definition.

The test in question has not changed for some time:

https://github.com/myitcv/govim/blob/46ffc9c315ce59fa13e7df943065e4ee6d2eb199/cmd/govim/testdata/go_to_def_useopen.txt

What did you expect to see?

No error.

What did you see instead?

failed to call gopls.Definition: no CheckPackageHandles for file://$WORK/q/q.go

At this stage I don't have a reproducer for this, and I haven't yet managed to reproduce it locally. When I can reproduce it locally, I will have a govim/gopls log


cc @stamblerre @ianthehat @muirrn

@gopherbot gopherbot added this to the Unreleased milestone Sep 5, 2019
@myitcv myitcv modified the milestones: Unreleased, gopls v1.0 Sep 5, 2019
@myitcv
Copy link
Member Author

@myitcv myitcv commented Sep 5, 2019

FYI - we've now moved to a version of gopls and x/tools that includes https://go-review.googlesource.com/c/tools/+/193601, so will monitor whether we see any recurrences of the above issue.

@myitcv
Copy link
Member Author

@myitcv myitcv commented Sep 12, 2019

To update on the previous comment: yes, we are still seeing this issue with c7d52e4. Not regularly, but it does happen when the user (our CI test in this case) is calling Definition so that would be noticed as a failure of the command.

@myitcv
Copy link
Member Author

@myitcv myitcv commented Oct 7, 2019

I suspect we can close this now following https://go-review.googlesource.com/c/tools/+/198317

@myitcv myitcv closed this Oct 7, 2019
@kevinburkemeter
Copy link

@kevinburkemeter kevinburkemeter commented Oct 22, 2019

I can still reproduce this error by calling :GoDef with github.com/jmhodges/justrun, when I have either GO111MODULE=off or GOFLAGS='-mod=vendor' set.

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Oct 22, 2019

@kevinburkemeter: What version of gopls are you using (gopls version)?

@kevinburkemeter
Copy link

@kevinburkemeter kevinburkemeter commented Oct 22, 2019

version v0.1.6-cmd.gopls, built in $GOPATH mode

I download/recompile /x/tools and Go tip more or less every day

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Oct 22, 2019

We recommend building gopls in module mode regardless of whether you are using modules, as module mode has additional features and improvements that we can't offer in GOPATH mode.

I am not able to reproduce your error with GO111MODULE=off--would you mind filing a new issue with a specific repro case? This original issue was more related to flaky errors with caching, whereas it sounds like you're encountering a genuine breakage.

@kevinburkemeter
Copy link

@kevinburkemeter kevinburkemeter commented Oct 22, 2019

opened #35081.

@stamblerre stamblerre modified the milestones: gopls/v1.0.0, gopls/v0.4.0 Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.