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: missing complete entry when using gopls 0.12.0 #60835

Closed
ccbhj opened this issue Jun 16, 2023 · 3 comments
Closed

x/tools/gopls: missing complete entry when using gopls 0.12.0 #60835

ccbhj opened this issue Jun 16, 2023 · 3 comments
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

@ccbhj
Copy link

ccbhj commented Jun 16, 2023

gopls version

golang.org/x/tools/gopls v0.12.0
golang.org/x/tools/gopls@v0.12.0 h1:O8KGdGuvu3YmAwim3KYmV2l20Cce5VMS74LayO2cDw8=

go env

GO111MODULE="on"
GOARCH="amd64"
GOBIN="/Users/bingjia.chen/go/bin"
GOCACHE="/Users/bingjia.chen/Library/Caches/go-build"
GOENV="/Users/bingjia.chen/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/bingjia.chen/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/bingjia.chen/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.19.9"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/cn/yf347khx1k1fh7ctyx6sdjgm0000gy/T/go-build9472372=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

After upgrading the gopls from 0.10.0 to 0.12.0, I found that when I trigger the completion for a struct with a lof of fields and methods, some of the fields/methods in the completion entry list were missing. However after I downgrade the gopls to 0.10.0, I can see the whole completion entry list again.

What did you expect to see?

Completion list contains all the fields and methods of a struct variable.

What did you see instead?

Some of the fields/methods in the completion entry list were missing

Editor and settings

Editor: nvim v0.9.1
Pluigins:ray-x/go.nvim
Lsp Config:

  lsp_cfg = {
    capabilities = require('cmp_nvim_lsp').default_capabilities(),
    handlers = handlers,
    settings = {
      gopls = {
        directoryFilters = {
          "-**/protobuf/go/",
          "-protobuf/go",
        },
        analyses = {
          shadow = false,
        }
      }
    }
  },

Logs

I think it has something do with the error "re-parsing: context deadline exceeded", because I can see this log when I am using goplsv0.10.0

[ERROR][2023-06-16 11:25:17] ...lsp/handlers.lua:535	"2023/06/16 11:25:17 no signature help: cannot find an enclosing function\n\tposition=1149:0\n"
[ERROR][2023-06-16 11:25:17] ...lsp/handlers.lua:535	"2023/06/16 11:25:17 no signature help: cannot find an enclosing function\n\tposition=1086:0\n"
[ERROR][2023-06-16 11:25:17] ...lsp/handlers.lua:535	"2023/06/16 11:25:17 no signature help: cannot find an enclosing function\n\tposition=939:0\n"
[ERROR][2023-06-16 11:25:17] ...lsp/handlers.lua:535	"2023/06/16 11:25:17 no signature help: cannot find an enclosing function\n\tposition=939:0\n"
[ERROR][2023-06-16 11:25:18] ...lsp/handlers.lua:535	"2023/06/16 11:25:18 no signature help: cannot find an enclosing function\n\tposition=933:0\n"
[ERROR][2023-06-16 11:25:20] ...lsp/handlers.lua:535	"2023/06/16 11:25:20 no signature help: cannot find an enclosing function\n\tposition=909:15\n"
[ERROR][2023-06-16 11:25:21] ...lsp/handlers.lua:535	"2023/06/16 11:25:21 no signature help: cannot find an enclosing function\n\tposition=909:33\n"
[ERROR][2023-06-16 11:25:24] ...lsp/handlers.lua:535	"2023/06/16 11:25:24 no signature help: cannot find an enclosing function\n\tposition=909:30\n"
[ERROR][2023-06-16 11:25:25] ...lsp/handlers.lua:535	'2023/06/16 11:25:25 failed to find Hover for "NotiCaseCenterStatus": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:25] ...lsp/handlers.lua:535	'2023/06/16 11:25:25 failed to find Hover for "DeleteKycInfoTags": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:26] ...lsp/handlers.lua:535	"2023/06/16 11:25:26 no signature help: cannot find an enclosing function\n\tposition=909:15\n"
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "BucketSeperator": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "AcceptableDataSource": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "DsApiType": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "APINameQueryKycFieldResult": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "DefaultAMLRequestBuilder": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "DsApiTab": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "DsApiTypeSet": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "ErrOutboxConfigNotFound": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "ErrOutboxDBError": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "DsApiTypeSelfieAs": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "DsApiTypeOcr": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "IDAMLRequestBuilder": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "ErrRequestExpired": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "IDWallRetryError": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KycAmlService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "ErrApiCacheNotSupported": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KycCreditServiceImpl": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KycDsService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KycAppVersionControlService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "DsApiTypeFaceMatch": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "DsApiTypeIcAs": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "DsApiTypeOne2NFaceMatch": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KycExpiryService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KycLivenessService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "ErrBusinessUnauthorized": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "IdWallDAOFunc": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "IDWallService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KycOutboxJobExecutor": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "Kyc3PartService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KYCAddressBookService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KycConfigService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KycCacheService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KycCreditService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KycGovernmentDomainService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KycExtraLogicService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KycFcstService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KycLevelAndVersionService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KycInfoService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	'2023/06/16 11:25:31 failed to find Hover for "KycOcrService": re-parsing: context deadline exceeded\n'
[ERROR][2023-06-16 11:25:31] ...lsp/handlers.lua:535	"2023/06/16 11:25:31 no signature help: cannot find an enclosing function\n\tposition=909:17\n"
[ERROR][2023-06-16 11:26:05] ...lsp/handlers.lua:535	"2023/06/16 11:26:05 no signature help: cannot find an enclosing function\n\tposition=0:0\n"
[ERROR][2023-06-16 11:26:05] ...lsp/handlers.lua:535	"2023/06/16 11:26:05 no signature help: cannot find an enclosing function\n\tposition=0:0\n"
[ERROR][2023-06-16 11:26:11] ...lsp/handlers.lua:535	"2023/06/16 11:26:11 no signature help: cannot find an enclosing function\n\tposition=909:15\n"
[ERROR][2023-06-16 11:26:12] ...lsp/handlers.lua:535	"2023/06/16 11:26:12 no signature help: cannot find an enclosing function\n\tposition=909:0\n"
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Jun 16, 2023
@gopherbot gopherbot added this to the Unreleased milestone Jun 16, 2023
@findleyr
Copy link
Contributor

Thanks for the report. I believe this was fixed by https://go.dev/cl/503016.

If possible, could you install gopls@master and confirm?

git clone https://go.googlesource.com/tools
cd tools/gopls
go install

@findleyr
Copy link
Contributor

Closing as a dupe of #53992.

@findleyr findleyr closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2023
@ccbhj
Copy link
Author

ccbhj commented Jun 21, 2023

Thanks for the report. I believe this was fixed by https://go.dev/cl/503016.

If possible, could you install gopls@master and confirm?

git clone https://go.googlesource.com/tools
cd tools/gopls
go install

looks good to me, thanks for replying.

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

3 participants