You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of protobuf and what language are you using?
Version: v3.9.0
Language: Java
What operating system (Linux, Windows, ...) and version?
Linux
What runtime / compiler are you using (e.g., python version or gcc version)
N/A
What did you do?
Steps to reproduce the behavior:
Have a .proto with optimize_for = LITE_RUNTIME
Compile into java using protoc --java_out=lite:${OUTPUT_DIR}
Get warning about LITE_RUNTIME deprecation and using the javalite plugin
What did you expect to see
No warnings, there is no more separate codegen plugin and now java lite uses protoc directly with the "lite:" prefix to --java_out= (as far as I understand from the lite.md).
What did you see instead?
[libprotobuf WARNING ../../third_party/protobuf/src/google/protobuf/compiler/java/java_file.cc:242] The optimize_for = LITE_RUNTIME option is no longer supported by protobuf Java code generator and is ignored--protoc will always generate full runtime code for Java. To use Java Lite runtime, users should use the Java Lite plugin instead. See: https://github.com/protocolbuffers/protobuf/blob/master/java/lite.md
Anything else we should know about your project / environment
The text was updated successfully, but these errors were encountered:
m0hamed
changed the title
LITE_
java LITE_RUNTIME deperacation warning even though following the java lite runtime docs
Aug 8, 2019
@m0hamed I think the warning is there because setting optimize_for = LITE_RUNTIME no longer has an effect on the Java code generation. Can you just remove that from your .proto file? (Or maybe you're keeping it since it still has an effect on C++?)
Ah, OK. The warning was meant to apply only to Java. However, you can do the same thing for C++ and pass --cpp_out=lite:..., so that would be a quick solution to get rid of the error.
I filed this because I was unsure if I somehow broke things and ended up using the full java runtime. From what you are saying that is not the case and the warning just happens regardless. I still feel you should not output unneeded warnings unless "optimize_for = LITE_RUNTIME" is being deprecated entirely (i.e. check if --java_out=lite: is used before outputting the warning). Either way feel free to close the issue.
What version of protobuf and what language are you using?
Version: v3.9.0
Language: Java
What operating system (Linux, Windows, ...) and version?
Linux
What runtime / compiler are you using (e.g., python version or gcc version)
N/A
What did you do?
Steps to reproduce the behavior:
What did you expect to see
No warnings, there is no more separate codegen plugin and now java lite uses protoc directly with the "lite:" prefix to --java_out= (as far as I understand from the lite.md).
What did you see instead?
[libprotobuf WARNING ../../third_party/protobuf/src/google/protobuf/compiler/java/java_file.cc:242] The optimize_for = LITE_RUNTIME option is no longer supported by protobuf Java code generator and is ignored--protoc will always generate full runtime code for Java. To use Java Lite runtime, users should use the Java Lite plugin instead. See:
https://github.com/protocolbuffers/protobuf/blob/master/java/lite.md
Anything else we should know about your project / environment
The text was updated successfully, but these errors were encountered: