johanbrandhorst / grpcweb-example

An example implementation of a GopherJS client and a Go server using the Improbable gRPC-Web implementation
MIT License
95 stars 12 forks source link

client gen broken for me... #7

Closed joeblew99 closed 7 years ago

joeblew99 commented 7 years ago

Hey,

i have a Makefile to run the code in this repo, but it fails on the regen. The proto runs, but the "go generate ./client/..." fails ....

cd /Users/apple/workspace/go/src/github.com/johanbrandhorst/grpcweb-example && protoc proto/library/book_service.proto --gopherjs_out=plugins=grpc,Mgoogle/protobuf/timestamp.proto=github.com/johanbrandhorst/protobuf/ptypes/timestamp:./client/ --go_out=plugins=grpc:./server/
google/protobuf
cd /Users/apple/workspace/go/src/github.com/johanbrandhorst/grpcweb-example && go generate ./client/...
proto/library/book_service.pb.gopherjs.go:474:11: GrpcWebPackageIsVersion2 not declared by package grpcweb
proto/library/book_service.pb.gopherjs.go:528:9: ServerStream not declared by package grpcweb
proto/library/book_service.pb.gopherjs.go:512:14: invalid operation: c.client (variable of type *github.com/johanbrandhorst/grpcweb-example/vendor/github.com/johanbrandhorst/protobuf/grpcweb.Client) has no field or method NewServerStream
proto/library/book_service.pb.gopherjs.go:532:15: invalid operation: x.stream (variable with invalid type) has no field or method RecvMsg
proto/library/book_service.pb.gopherjs.go:541:9: invalid operation: x.stream (variable with invalid type) has no field or methodContext

Suggested fix:

i think that the vendored "./vendor/myitcv.io/immutable/cmd/immutableGen" has a dependence on the "myitcv.io/gogenerate" and its changed recently and so you need to revendor it.

i hit this a few days ago and he fixed it on his side: https://github.com/myitcv/immutable/issues/52

BTW what are you using for vendoring ? Just so i can try to fix this as i move forward also and help..

joeblew99 commented 7 years ago

I think i fixed it:

dep ensure -update myitcv.io/gogenerate

make regenerate now works. https://localhost:10000/ now works...