diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2018-04-12 17:58:55 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2018-04-12 17:58:55 -0700 |
commit | 7d55040eebab0f2345e6d73905137a030bef35bb (patch) | |
tree | 09edcffd8dc3c94221a30147774a81b42a82e7a5 /src/google | |
parent | 320d56c833f835f40c56bdaf2a375768cdd1b334 (diff) |
Cleanup + documentation for Java Lite runtime.
Diffstat (limited to 'src/google')
-rw-r--r-- | src/google/protobuf/compiler/java/java_file.cc | 10 |
1 files changed, 10 insertions, 0 deletions
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; } |