-
Notifications
You must be signed in to change notification settings - Fork 15.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java wrappers.proto broken since 3.0.0 following GeneratedMessage versionning? #2017
Comments
Old generated code won't work with protobuf 3.0.0 runtime. I think you just need to update your genreated code by running the latest protoc. |
I did regenerate the code, but then the code doesn't compile anymore for the reasons mentionned earlier, we're using https://github.com/xolstice/protobuf-maven-plugin for code generation. Let me know if you believe I'm not doing it correclty. thanks. |
Could you please label it as a bug? thanks. |
Int32Value is part of protobuf library itself (included in protobuf-java.jar maven artifact), so if you have the correct dependency, you shouldn't need to compile it from source. This seems to me a problem in your build setup. |
I am facing the same problem (although with other types than Int32Value). Proto files following The SingleFieldBuilder class should extend GeneratedMessageV3 as stated in the initial issue report but it extends GeneratedMessage instead. |
If you have regenerated the code using the latest protoc, it should not have "SingleFieldBuilder" in the generated code, but instead "SingleFieldBuilderV3". I still think the problem is the use of an out-dated protoc somewhere in your build config. |
It was a maven dependency issue in our case, problem fixed. If someone has the same problem you might want to check that you're using all proto deps in the same versions (including those inherited from parent poms) Thanks for your help. |
Hi,
I can't use Int32Value on proto3 since 3.0.0 (was working fine on 3.0.0-beta-4).
possibly related to 2e30301 and the versionning of GeneratedMessage.
broken code below
Int32Value
extendsGeneratedMessageV3
butSingleFieldBuilder
extendsGeneratedMessage
thanks
The text was updated successfully, but these errors were encountered: