Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to import google.protobuf.* ?? #133

Open
wencan opened this issue Apr 19, 2019 · 4 comments
Open

How to import google.protobuf.* ?? #133

wencan opened this issue Apr 19, 2019 · 4 comments

Comments

@wencan
Copy link

wencan commented Apr 19, 2019

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"

@nefethael
Copy link

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

@alysidi
Copy link

alysidi commented Aug 12, 2020

Did you guys figure this out for includes?

@bobbymlp
Copy link

I am having the same issue

@re0078
Copy link

re0078 commented Feb 22, 2022

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants