protobuf-2.5.0/bin/protoc doesn't recognize "stream"?

29 views
Skip to first unread message

Yanpeng Wu

unread,
Feb 15, 2018, 4:50:35 PM2/15/18
to grpc.io
helloworld.proto

syntax = "proto2";
package helloworld;

// The greeting service definition.
service Greeter {
  // Sends a greeting
  rpc SayHello (HelloRequest) returns (stream HelloReply) {}
}

// The request message containing the user's name.
message HelloRequest {
  optional string name = 1;
}

// The response message containing the greetings
message HelloReply {
  optional string message = 1;
}


$../protobuf-2.5.0/bin/protoc -I. --cpp_out=. helloworld.proto
$ helloworld.proto:7:47: Expected ")".

Furthermore, are there any harms to incorporate grpc-1.8.4 with protobuf-2.5.0? 

Thanks!


Josh Humphries

unread,
Feb 15, 2018, 5:32:36 PM2/15/18
to Yanpeng Wu, grpc.io
The stream keyword was added in protobuf 3.0. (Version 2.5 is quite old.) Support for map types and proto3 syntax (which comes with a handful of language restrictions and semantic changes for messages) were also added in 3.0.

----
Josh Humphries
jh...@bluegosling.com

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/8d7dd32c-0d64-4087-918f-62e8a7b93dbc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yanpeng Wu

unread,
Feb 16, 2018, 9:22:07 AM2/16/18
to grpc.io
I see, thanks Josh!

----
Josh Humphries
jh...@bluegosling.com

To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages