Closed jaakkor2 closed 2 years ago
Thanks for reporting this. Yeah, there are still little things like that where we differ from protoc, we'll get it right eventually.:) Should be an easy fix.
It looks like the fix in #213 doesn't work for tested structures. I'm getting the error on this example from onnx.proto3:
message TensorShapeProto {
message Dimension {
oneof value {
int64 dim_value = 1;
string dim_param = 2; // namespace Shape
};
// Standard denotation can optionally be used to denote tensor
// dimensions with standard semantic descriptions to ensure
// that operations are applied to the correct axis of a tensor.
// Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition
// for pre-defined dimension denotations.
string denotation = 3;
};
repeated Dimension dim = 1;
}
I guess the fix should also be trivial, but I'm not sure what part of the code is responsible for this case.
Julia v1.8
ProtoBuf v1.0.5 https://github.com/JuliaIO/ProtoBuf.jl.git#master
Thanks for reporting, @dfdx! A fix should be merged soon. Until then, you can just delete the semicolon after the oneof field definition.
This in file
test2.proto
fails with
protojl("test2.proto", ".", "output_dir")
from ProtoBuf.jl v1.0.3I saw proto-files in the wild with message-expression ending in a semicolon.
libprotoc
version 3.21.4 compiles this fine.