grpc-dart icon indicating copy to clipboard operation
grpc-dart copied to clipboard

protobuf lib in example still at v2

Open kronthto opened this issue 2 years ago • 1 comments

Hi:

it looks like this was bumped to 3 recently and the docs also state to use the latest compiler version.

https://github.com/grpc/grpc-dart/blob/9dadc31cba0c1621eb104809d144b8283d337dcb/example/helloworld/pubspec.yaml#L12

This is still at v2. The included generated files work, but once you regenerate them the latest version syntax is included and it errors:

$ protoc --dart_out=grpc:lib/src/generated -Iprotos protos/helloworld.proto
$ dart bin/server.dart
lib/src/generated/helloworld.pbgrpc.dart:22:6: Error: Couldn't find constructor 'GrpcServiceName'.
@$pb.GrpcServiceName('helloworld.Greeter')
     ^^^^^^^^^^^^^^^

// import 'package:protobuf/protobuf.dart' as $pb;

kronthto avatar Jul 20 '23 14:07 kronthto

@mosuem This issue has been resolved. thank you.

utamori avatar Sep 11 '24 01:09 utamori