Closed vimalk78 closed 4 years ago
If you want to use :GoChannelPeers
, you'll need to be in GOPATH mode, not module aware mode, because it relies on guru
and guru
does not support modules. gopls
doesn't have an option to get channel peers yet.
However, the errors you're seeing look like vim-go hasn't gotten to running guru yet and is still dealing with the fallout of running go list
.
i am using go1.13.4
modules is enabled by default. how do i be in GOPATH mode?
and any pointers on why go list
is producing so many errors?
To be in GOPATH mode, your code will need to be in $GOPATH/src
and you'll need GO111MODULE=off
.
The errors you're seeing look pretty straightforward: it's a mixture of permissions errors and package incompatibilities. All of these can be analyzed by running go list ./...
in the root directory of your module.
To be in GOPATH mode, your code will need to be in $GOPATH/src and you'll need GO111MODULE=off.
I tried that, and i get below errors.
The GOPATH is set to /home/vimalkum/go
vimalkum (master) etcd $ echo $GO111MODULE
off
These messages i get by checking :messages
command
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/embed/etcd.go:202:31: cannot use cfg.loggerCore (variable of type zapcore.Core) as zapcore.Core value in
struct literal: wrong type for method Check
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/embed/config_logging.go:308:59: cannot use cr (variable of type zapcore.Core) as zapcore.Core value in a
rgument to logutil.NewGRPCLoggerV2FromZapCore: wrong type for method Check
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/embed/config_logging.go:102:31: cannot use logutil.ConvertToCapnslogLogLevel(cfg.LogLevel) (value of typ
e capnslog.LogLevel) as capnslog.LogLevel value in argument to capnslog.SetGlobalLogLevel
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/embed/config_logging.go:177:40: cannot use logutil.ConvertToZapLevel(cfg.LogLevel) (value of type zapcor
e.Level) as zapcore.Level value in argument to zap.NewAtomicLevelAt
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/embed/config_logging.go:177:19: cannot use zap.NewAtomicLevelAt(logutil.ConvertToZapLevel(cfg.LogLevel))
(value of type zap.AtomicLevel) as zap.AtomicLevel value in assignment
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/embed/config_logging.go:187:22: cannot use copied.Build() (value of type *zap.Logger) as *zap.Logger val
ue in assignment
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/embed/config_logging.go:193:23: cannot use &copied (value of type *zap.Config) as *zap.Config value in a
ssignment
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/embed/config_logging.go:223:32: cannot use logutil.ConvertToZapLevel(cfg.LogLevel) (value of type zapcor
e.Level) as zapcore.Level value in argument to zap.NewAtomicLevelAt
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/embed/config_logging.go:234:28: cannot use logutil.DefaultZapLoggerConfig.EncoderConfig (variable of typ
e zapcore.EncoderConfig) as zapcore.EncoderConfig value in argument to zapcore.NewJSONEncoder
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/embed/config_logging.go:248:62: cannot use cr (variable of type zapcore.Core) as zapcore.Core value in a
rgument to logutil.NewGRPCLoggerV2FromZapCore: wrong type for method Check
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/embed/config.go:787:44: cannot use cfg.logger (variable of type *zap.Logger) as *zap.Logger value in arg
ument to transport.SelfCert
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/embed/config.go:764:46: cannot use cfg.logger (variable of type *zap.Logger) as *zap.Logger value in arg
ument to transport.SelfCert
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/functional/cmd/etcd-tester/main.go:42:33: cannot use logger (variable of type *zap.Logger) as *zap.Logge
r value in argument to tester.NewCluster
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/functional/agent/server.go:97:32: cannot use srv.grpcServer (variable of type *grpc.Server) as *grpc.Ser
ver value in argument to rpcpb.RegisterTransportServer
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/functional/agent/handler.go:603:35: cannot use srv.lg (variable of type *zap.Logger) as *zap.Logger valu
e in argument to srv.Member.RestoreSnapshot
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/functional/agent/handler.go:591:33: cannot use srv.lg (variable of type *zap.Logger) as *zap.Logger valu
e in argument to srv.Member.SaveSnapshot
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/functional/agent/handler.go:221:12: cannot use srv.lg (variable of type *zap.Logger) as *zap.Logger valu
e in struct literal
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/functional/agent/handler.go:245:12: cannot use srv.lg (variable of type *zap.Logger) as *zap.Logger valu
e in struct literal
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/integration/cluster.go:824:44: cannot use m.grpcServerOpts (variable of type []grpc.ServerOption) as []g
rpc.ServerOption value in argument to v3rpc.Server
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/integration/cluster.go:824:18: cannot use v3rpc.Server(m.s, tlscfg, m.grpcServerOpts...) (value of type
*grpc.Server) as *grpc.Server value in assignment
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/integration/cluster.go:825:22: cannot use v3rpc.Server(m.s, peerTLScfg) (value of type *grpc.Server) as
*grpc.Server value in assignment
vim-go: /home/vimalkum/go/src/github.com/etcd-io/etcd/integration/cluster.go:827:29: cannot use m.grpcServer (variable of type *grpc.Server) as *grpc.Server v
alue in argument to lockpb
These are all errors from Go. It looks as though you may have some type shadowing happening.
It worked.
I had to :
GO111MODULE
and run mo mod vendor
GO111MODULE
and run :GoChannelPeers
What did you do? (required: The issue will be closed when not provided)
open https://github.com/etcd-io/etcd/blob/master/clientv3/watch.go and run
:GoChannelPeers
in nvimWhat did you expect to happen?
a quicklist showing channel read/write/ references, as it used to show quite some time ago.
What happened instead?
Since i am using nvim, perhaps the operation runs in background, but
:GoChannelPeers
doesnt produce any result for a long time. When i quit vim, LARGE amount of erorrs are thrown on the screenERROR on quitting vim
:GoChannelPeers
usesguru
, and seemsguru
is not usable with modules? and must usegopls
instead.How to replace
vim-go
commands which useguru
to port to usegopls
Configuration (MUST fill this out):
vim-go version:
vimrc
you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):vimrc
Vim version (first three lines from
:version
):NVIM v0.5.0-245-g1bfccf028 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3
Go version (
go version
):go version go1.13.4 linux/amd64
Go environment
go env
Output:gopls version
gopls version
Output:vim-go configuration:
vim-go configuration