Hi, In GRPC examples, I deleted helloworld.pb.go and recreated it (after installing protoc-gen-go from "google.golang.org/protobuf" cmd):
xx:~/gopath/src/google.golang.org/grpc/examples/helloworld$ cd helloworld/ xx:~/gopath/src/google.golang.org/grpc/examples/helloworld/helloworld$ *protoc --go_out=. helloworld.proto * I then tried to build server and client binaries: xx:~/gopath/src/google.golang.org/grpc/examples/helloworld$ *go build -o server -v -a greeter_server/main.go * ... command-line-arguments # command-line-arguments greeter_server/main.go:39:2: undefined: helloworld.UnimplementedGreeterServer greeter_server/main.go:54:2: undefined: helloworld.RegisterGreeterServer xx:~/gopath/src/google.golang.org/grpc/examples/helloworld$ *go build -o client -v -a greeter_client/main.go * ... # command-line-arguments greeter_client/main.go:44:7: undefined: helloworld.NewGreeterClient Am I the only one seeing this issue? Did I make any mistake? Regards dharani On Fri, Apr 17, 2020 at 12:40 AM Tharaneedharan Vilwanathan < vdhar...@gmail.com> wrote: > Thank you all for the response. I changed the version to 1.4.0 for > protobuf in grpc. I think it works fine but it also looked like if I > attempt to regenerate .pb.go file for the "helloworld" example of grpc, it > didn't quite seem to work. I will try it again a bit later. > > Regards > dharani > > On Mon, Apr 13, 2020 at 4:56 PM <thebrokentoas...@gmail.com> wrote: > >> In terms of whether the public API needs to change in light of the new >> protobuf API, the only place that the old protobuf API leaks to the public >> grpc API is here: >> https://pkg.go.dev/google.golang.org/grpc/credentials?tab=doc#OtherChannelzSecurityValue >> (where >> it uses the old proto.Message definition here). It seems that users of grpc >> should be able to use it with almost no effort at all. >> >> JT >> >> On Monday, April 13, 2020 at 4:01:23 PM UTC-7, Joe Tsai wrote: >>> >>> As of right now, grpc is on github.com/golang/protobuf@v1.3.3 >>> <https://github.com/grpc/grpc-go/blob/8e6052a06fef1de81aadcb5ba3feed6faf6d07df/go.mod#L10>. >>> However, nothing stops you in your specific application to upgrade to >>> github.com/golang/protobuf@v1.4.0, which just a thin wrapper over the >>> google.golang.org/protobuf >>> <https://pkg.go.dev/mod/google.golang.org/protobuf> module. Better yet, >>> if you were to start using the google.golang.org/protobuf module >>> directly, it would impose a weak dependency on >>> github.com/golang/protobuf@v1.4.0, which would cause grpc to be built >>> with the new implementation. >>> >>> JT >>> >>> On Monday, April 13, 2020 at 3:50:13 PM UTC-7, Ian Lance Taylor wrote: >>>> >>>> [ + joetsai ] >>>> >>>> On Mon, Apr 13, 2020 at 3:41 PM Tharaneedharan Vilwanathan >>>> <vdha...@gmail.com> wrote: >>>> > >>>> > Hi, >>>> > >>>> > I have a quick question. >>>> > >>>> > I was going through this: >>>> > https://blog.golang.org/protobuf-apiv2 >>>> > >>>> > I would like to know if grpc is using this new version. To the extent >>>> I tried, it seemed to use the old API. Am I right? If so, how do I make >>>> grpc use the new API? Or am I missing something? >>>> > >>>> > Please let me know. Appreciate your help! >>>> > >>>> > Regards >>>> > dharani >>>> > >>>> > -- >>>> > You received this message because you are subscribed to the Google >>>> Groups "golang-nuts" group. >>>> > To unsubscribe from this group and stop receiving emails from it, >>>> send an email to golan...@googlegroups.com. >>>> > To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/golang-nuts/CAN-HoC%3D0JFTTzsQ9LwxTnX3k6F9KdRWG2aAu76W6hSkkvjCzvg%40mail.gmail.com. >>>> >>>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "golang-nuts" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to golang-nuts+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/golang-nuts/49362219-9235-4960-b5b4-9a55049e2e54%40googlegroups.com >> <https://groups.google.com/d/msgid/golang-nuts/49362219-9235-4960-b5b4-9a55049e2e54%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAN-HoCmV74wL9DxzKW2pLRNZNO_T5UjY1BSZNFARWTQ%2BwLo3jw%40mail.gmail.com.