I have a this sample protobuf message:
message testMessage{
oneof oneOfTest{
string test2 = 2;
int32 test3 = 3;
}
}
But it is failing to compile, saying:
[ERROR] protoc failed error: Expected "required", "optional", or "repeated".
test.proto: Missing field number.
Based on the line numbers, it is looking for that required/optional/repeated keyworkd before "oneof" and it is complaining of the missing field number after "oneOfTest". Is this not the correct way to use oneof? I am using the java compiler for Protobuf.
oneof
was added in 2.6, which appears to have been released last Monday. – Louis Wasserman Sep 2 '14 at 17:49oneof
feature was new. If you want write your comment as the question, I can accept it as the answer. – yellavon Sep 2 '14 at 18:48