I updated a proto file from proto2 to proto3 as follows.
Previous proto2:
message RegisterWatcherResponse {
required int32 rc = 1;
optional uint64 sendTime = 2;
}
Now proto3:
message RegisterWatcherResponse {
int32 rc = 1;
optional uint64 sendTime = 2;
}
I tested compatibility by using old version client with using proto2
RegisterWatcherResponse and receiving responses from a server using proto3
RegisterWatcherResponse.
It turns out clients got failure message like follows:
[libprotobuf ERROR google/protobuf/message_lite.cc:118] Can't parse message
of type "RegisterWatcherResponse" because it is missing required fields: rc
I'm sure the server side responses have rc filed.
Can anyone help me why I got this error? Is proto3 compatible with proto2
in this scenario?
What can I do to make it work?
Thanks,
Yihao
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.