Cannot generate java file with google proto Any, timestamp
Closed this issue · 3 comments
Hi
I have my file:
`syntax = "proto3";
package models;
option java_package = "models";
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
...
But when generating java file:
protoc-quickbuf --quickbuf_out=indent=4,allocation=lazy,extensions=embedded:src/main/java src/main/resources/models.proto`
, I got these error:
google/protobuf/any.proto: File not found.
google/protobuf/timestamp.proto: File not found.
...models.proto:6:1: Import "google/protobuf/any.proto" was not found or had errors.
...models.proto:7:1: Import "google/protobuf/timestamp.proto" was not found or had errors.
How could I generate file with Any and Timestamp
Proto3 and well-known types are not explicitly supported. You'd need to add the any.proto
and timestamp.proto
files from https://github.com/protocolbuffers/protobuf/tree/main/src/google/protobuf yourself.
ah, ok, let me try it
Many thanks
I added a link in the Readme to make it more clear. Note that the JSON representations for e.g. Timestamp are not special-cased and currently do not match Protobuf-Java's.