Skip to content

Well known proto support #168

Open
Open
@powturns

Description

@powturns

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions