Skip to content

Commit

Permalink
Make .proto files generated by "piqi to-proto" as "proto2"
Browse files Browse the repository at this point in the history
"piqi to-proto" is now generating 'syntax = "proto2"'; at the top of
converted .proto files. This prevents protoc from printing warnings like
this:

    No syntax specified for the proto file: ... Please use 'syntax =
    "proto2";' or 'syntax = "proto3";' to specify a syntax version.
    (Defaulted to proto2 syntax.)
  • Loading branch information
alavrik committed Apr 18, 2018
1 parent 97e4c2b commit ecdbc46
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/to_proto.ml
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ let gen_piqi (piqi:T.piqi) =
List.map (fun x -> iol [ios x; eol; eol]) piqi.P.protobuf_custom
in
iol [
ios "syntax = \"proto2\";\n\n";
package;
iol proto_custom;
piqi_import;
Expand Down

0 comments on commit ecdbc46

Please sign in to comment.