From 7d55040eebab0f2345e6d73905137a030bef35bb Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Thu, 12 Apr 2018 17:58:55 -0700 Subject: Cleanup + documentation for Java Lite runtime. --- src/google/protobuf/compiler/java/java_file.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/google/protobuf/compiler/java/java_file.cc b/src/google/protobuf/compiler/java/java_file.cc index 5ee04e5a..610bc51a 100644 --- a/src/google/protobuf/compiler/java/java_file.cc +++ b/src/google/protobuf/compiler/java/java_file.cc @@ -225,6 +225,16 @@ bool FileGenerator::Validate(string* error) { "option to specify a different outer class name for the .proto file."); return false; } + // Print a warning if optimize_for = LITE_RUNTIME is used. + if (file_->options().optimize_for() == FileOptions::LITE_RUNTIME) { + GOOGLE_LOG(WARNING) + << "The optimize_for = LITE_RUNTIME option is no longer supported by " + << "protobuf Java code generator and may generate broken code. It " + << "will be ignored by protoc in the future and protoc will always " + << "generate full runtime code for Java. To use Java Lite runtime, " + << "users should use the Java Lite plugin instead. See:\n" + << " https://github.com/google/protobuf/blob/master/java/lite.md"; + } return true; } -- cgit v1.2.3