zeromicro / zeromicro/zero-doc

here's some compile errors

Open
#40 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
600
Forks
249
PR merge metrics
No merged PRs in 30d

Description

follow the example bookstore, and some error occurs

admindeMacBook-Pro-7:add admin$ pwd
/Users/admin/goProj/bookstore/rpc/add

go 1.15

require (
github.com/golang/protobuf v1.4.3
github.com/tal-tech/go-zero v1.1.4
google.golang.org/grpc v1.36.0
google.golang.org/protobuf v1.25.0
)

admindeMacBook-Pro-7:add admin$ go run .

go.etcd.io/etcd/clientv3/balancer/picker

../../../../go/pkg/mod/go.etcd.io/etcd@v0.0.0-20200402134248-51bdeb39e698/clientv3/balancer/picker/err.go:25:9: cannot use &errPicker literal (type *errPicker) as type Picker in return argument:
*errPicker does not implement Picker (wrong type for Pick method)
have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
want Pick(balancer.PickInfo) (balancer.PickResult, error)
../../../../go/pkg/mod/go.etcd.io/etcd@v0.0.0-20200402134248-51bdeb39e698/clientv3/balancer/picker/roundrobin_balanced.go:33:9: cannot use &rrBalanced literal (type *rrBalanced) as type Picker in return argument:
*rrBalanced does not implement Picker (wrong type for Pick method)
have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
want Pick(balancer.PickInfo) (balancer.PickResult, error)

github.com/tal-tech/go-zero/zrpc/internal/balancer/p2c

../../../../go/pkg/mod/github.com/tal-tech/go-zero@v1.1.4/zrpc/internal/balancer/p2c/p2c.go:41:32: not enough arguments in call to base.NewBalancerBuilder
have (string, *p2cPickerBuilder)
want (string, base.PickerBuilder, base.Config)
../../../../go/pkg/mod/github.com/tal-tech/go-zero@v1.1.4/zrpc/internal/balancer/p2c/p2c.go:58:9: cannot use &p2cPicker literal (type *p2cPicker) as type balancer.Picker in return argument:
*p2cPicker does not implement balancer.Picker (wrong type for Pick method)
have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
want Pick(balancer.PickInfo) (balancer.PickResult, error)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running go run . from bookstore/rpc/add and review the reported version mismatches in the etcd and go-zero balancer files under the Go module cache. Compare the example's go.mod dependencies with the APIs used by those modules; done means the example compiles successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, grpc
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.