From ecdbc465bcac0750506a4218af3a705a5370ab81 Mon Sep 17 00:00:00 2001 From: Anton Lavrik Date: Tue, 17 Apr 2018 23:38:18 -0700 Subject: [PATCH] Make .proto files generated by "piqi to-proto" as "proto2" "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.) --- src/to_proto.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/to_proto.ml b/src/to_proto.ml index 162e54fb..a4cbb55a 100644 --- a/src/to_proto.ml +++ b/src/to_proto.ml @@ -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;