pyrobuf
pyrobuf copied to clipboard
How to import google.protobuf.* ??
I need import "google/protobuf/timestamp.proto".
I already cloned protocolbuffers/protobuf, and exec "pyrobuf --proto3 --include xxx/yyy/protocolbuffers/protobuf/src myproto3.proto" pyrobuf output: "AssertionError: unexpected ENUM_FIELD token on line 44: ' google.protobuf.Timestamp xxx yyy"
Hi,
I have the same question, I'm trying to use google/protobuf/any.proto and google/protobuf/timestamp.proto, I'm not sure it's supported by pyrobuf?
Regards, Vincent
Did you guys figure this out for includes?
I am having the same issue
It doesn't seem to be supported yet. Including this piece of code in .proto
file works for me (for timestamp in particular).
message Timestamp {
// Represents seconds of UTC time since Unix epoch
// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
// 9999-12-31T23:59:59Z inclusive.
int64 seconds = 1;
// Non-negative fractions of a second at nanosecond resolution. Negative
// second values with fractions must still have non-negative nanos values
// that count forward in time. Must be from 0 to 999,999,999
// inclusive.
int32 nanos = 2;
}