diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2018-04-18 16:42:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-18 16:42:24 -0700 |
commit | 0dc4d75da7bde8944bbefffae15931ea2eaf0759 (patch) | |
tree | 17415f951e710a5b2ff15fb0078493214ec046f4 /src | |
parent | 9497a657d577ebda0272711651c3dcdda3a4ac35 (diff) | |
parent | a29e2bfb3bed35036e2ccdc039c69d72e75a423a (diff) | |
download | protobuf-0dc4d75da7bde8944bbefffae15931ea2eaf0759.tar.gz protobuf-0dc4d75da7bde8944bbefffae15931ea2eaf0759.tar.bz2 protobuf-0dc4d75da7bde8944bbefffae15931ea2eaf0759.zip |
Merge pull request #4504 from xfxyjwf/lite
Cleanup + documentation for Java Lite runtime.
Diffstat (limited to 'src')
-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 d8f11d80..5583b779 100644 --- a/src/google/protobuf/compiler/java/java_file.cc +++ b/src/google/protobuf/compiler/java/java_file.cc @@ -223,6 +223,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; } |