-
Notifications
You must be signed in to change notification settings - Fork 29
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
Proto Builder Generator uses wrong java builder function #115
Comments
I did some more tests to see what rules the casing for the generated Java classes follows.
Looks like the first letter after a number is always uppercase in the generated Java code. |
Looks like this is the issue: The way the java plugin does it is capitalizing the next character after an integer: It's quite funny that even the google documentation suggests to look at the logic in that file:
Source: https://developers.google.com/protocol-buffers/docs/reference/java-generated#plugins I guess it would make the most sense to port the logic from the |
Hey folks, I'm having an issue with the generated builders.
I'm using the following versions in my project
com.google.protobuf:3.10.0
com.google.protobuf:protobuf-java-util:3.10.0
com.github.marcoferrer.krotoplus:protoc-gen-kroto-plus:0.6.1
With the following demo proto:
When building the java class from it the builder for the field looks like the following:
public Builder addSomeB2BBooks(com.example.ProtoOtherMessage value) {
But the generated kroto+ builders try to call:
this.addSomeB2bBooks(ProtoOtherMessage.newBuilder().apply(block).build())
.So
BB
vsbB
.Full generated kroto+ code:
So this references itself which makes my builds break.
Is this a bug or do I need to adjust the generated casing on my side?
Just in case someone asks my kroto+ settings look like the following:
The text was updated successfully, but these errors were encountered: