From 2265129e143573c26bcb7455dcb89dc73dd1bb77 Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen <aardappel@gmail.com> Date: Thu, 18 Jan 2018 11:21:10 -0800 Subject: [PATCH] Removed date/time from generated code, causing commit polution. Change-Id: I79724416110a3d2241d7eeecf0e12aa6d5b760a0 --- grpc/src/compiler/java_generator.cc | 11 +++++------ tests/MyGame/Example/MonsterStorageGrpc.java | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/grpc/src/compiler/java_generator.cc b/grpc/src/compiler/java_generator.cc index 929c81a6..b22d4193 100644 --- a/grpc/src/compiler/java_generator.cc +++ b/grpc/src/compiler/java_generator.cc @@ -55,8 +55,7 @@ void GenerateImports(grpc_generator::File* file, vars["filename"] = file->filename(); printer->Print( vars, - "//Generated by flatc compiler (version $flatc_version$) on " __DATE__ - " " __TIME__ " \n"); + "//Generated by flatc compiler (version $flatc_version$)\n"); printer->Print("//If you make any local changes, they will be lost\n"); printer->Print(vars, "//source: $filename$.fbs\n\n"); printer->Print(vars, "package $Package$;\n\n"); @@ -337,12 +336,12 @@ static void PrintMethodFields(Printer* p, VARS& vars, const ServiceDescriptor* service) { p->Print("// Static method descriptors that strictly reflect the proto.\n"); vars["service_name"] = service->name(); - + //set of names of rpc input- and output- types that were already encountered. //this is needed to avoid duplicating type extractor since it's possible that //the same type is used as an input or output type of more than a single RPC method std::set<std::string> encounteredTypes; - + for (int i = 0; i < service->method_count(); ++i) { auto method = service->method(i); vars["arg_in_id"] = to_string((long)2 * i); //trying to make msvc 10 happy @@ -382,7 +381,7 @@ static void PrintMethodFields(Printer* p, VARS& vars, "private static volatile $MethodDescriptor$<$input_type$,\n" " $output_type$> $method_new_field_name$;\n" "\n"); - + if (encounteredTypes.insert(vars["input_type_name"]).second) { vars["extr_type"] = vars["input_type"]; vars["extr_type_name"] = vars["input_type_name"]; @@ -394,7 +393,7 @@ static void PrintMethodFields(Printer* p, VARS& vars, vars["extr_type_name"] = vars["output_type_name"]; PrintTypeExtractor(p, vars); } - + p->Print( vars, "@$ExperimentalApi$(\"https://github.com/grpc/grpc-java/issues/" diff --git a/tests/MyGame/Example/MonsterStorageGrpc.java b/tests/MyGame/Example/MonsterStorageGrpc.java index 2d203e63..4627db8d 100644 --- a/tests/MyGame/Example/MonsterStorageGrpc.java +++ b/tests/MyGame/Example/MonsterStorageGrpc.java @@ -1,4 +1,4 @@ -//Generated by flatc compiler (version 1.8.0) on Dec 28 2017 10:07:47 +//Generated by flatc compiler (version 1.8.0) //If you make any local changes, they will be lost //source: monster_test.fbs -- GitLab