-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
inconsistent identifier capitalization between protoc-gen-go and protoc-gen-grpc-gateway #683
Comments
I think the easiest fix here will be copy-pasting the This should be reasonably easy to fix, anyway. |
@johanbrandhorst I am starting work on this issue. Do let me know if there is something I need to keep in mind. |
@waveywaves thanks! I don't think there's anything particular to keep in mind if we can easily port the logic from |
The incompatibility caused between the generated .pb.gw.go and .pb.go files due to inconsistent identifier capitalization has been fixed here. Logic from protoc-gen-go for the Message, Service and Method Names is ported to protoc-gen-grpc-gateway. Have made changes in the template.go file and have written a test so we don't regress this in the future. This fixes grpc-ecosystem#683
The incompatibility caused between the generated .pb.gw.go and .pb.go files due to inconsistent identifier capitalization has been fixed here. Logic from protoc-gen-go for the Message, Service and Method Names is ported to protoc-gen-grpc-gateway. Have made changes in the template.go file and have written a test so we don't regress this in the future. This fixes grpc-ecosystem#683
The incompatibility caused between the generated .pb.gw.go and .pb.go files due to inconsistent identifier capitalization has been fixed here. Logic from protoc-gen-go for the Message, Service and Method Names is ported to protoc-gen-grpc-gateway. Have made changes in the template.go file and have written a test so we don't regress this in the future. This fixes #683
The incompatibility caused between the generated .pb.gw.go and .pb.go files due to inconsistent identifier capitalization has been fixed here. Logic from protoc-gen-go for the Message, Service and Method Names is ported to protoc-gen-grpc-gateway. Have made changes in the template.go file and have written a test so we don't regress this in the future. This fixes grpc-ecosystem#683
In the following proto file, notice the underscores, numbers (and possibly other characters) in identifiers:
After compiling such file, building the executables produces these errors:
Looking at the pb.go file, we can see the identifiers are different from those in pb.gw.go file
Judging from the code, this happens because protoc-gen-go uses CamelCase
whereas protoc-gen-grpc-gateway simply calls strings.Title
The text was updated successfully, but these errors were encountered: