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

Well known proto support #168

Open
powturns opened this issue Nov 30, 2022 · 0 comments
Open

Well known proto support #168

powturns opened this issue Nov 30, 2022 · 0 comments
Assignees
Milestone

Comments

@powturns
Copy link
Contributor

When running Codegen on a proto file that relies on google's well known types (eg: google.protobuf.Timestamp / import "google/protobuf/timestamp.proto"), an error is thrown:

thread 'main' panicked at 'Gen code failed.: Custom { kind: Other, error: "protobuf path \"google/protobuf/timestamp.proto\" is not found in import path [\"src/protocols/protos\"]" }', build.rs:35:10

It appears this is because ttrpc_compiler::codegen isn't aware of these types, so it has trouble parsing the proto file.
However, protobuf_codegen, which is responsible for generating the message classes handles the well known types without any problems. I suspect ttrpc_compiler doesn't actually need to know about the common types as it seems to be mostly interested in generating the RPC stubs.

@Tim-Zhang Tim-Zhang self-assigned this Jan 10, 2023
@Tim-Zhang Tim-Zhang added this to the 0.8.0 milestone Jan 13, 2023
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

2 participants