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
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@myitcv
Copy link
Member

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

@myitcv myitcv added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. gopls Issues related to the Go language server, gopls. labels Sep 5, 2019
@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 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.

@stamblerre stamblerre added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 9, 2019
@myitcv
Copy link
Member Author

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 commented Oct 7, 2019

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

@myitcv myitcv closed this as completed Oct 7, 2019
@kevinburke1
Copy link

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

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

@kevinburke1
Copy link

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

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.

@kevinburke1
Copy link

opened #35081.

@stamblerre stamblerre modified the milestones: gopls/v1.0.0, gopls/v0.4.0 Jul 22, 2020
@golang golang locked and limited conversation to collaborators Jul 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. 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