-
Notifications
You must be signed in to change notification settings - Fork 65
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
gRPC CLI unable to generate all the necessary messages #2766
gRPC CLI unable to generate all the necessary messages #2766
Comments
@shafreenAnfar @daneshk @MadhukaHarith92 @dilanSachi any input for this issue. |
Currently, When we give a directory path instead of a proto file path to the input path, it generates the stub files for all the proto files. But it does not check inside the nested directories. |
Shall we use solution 02 in the proposal to support nested directories, in [1]
|
This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now. |
Description:
When we develop gRPC applications with
google.protobuf.Any
type, we have to generate records for all the messages in a specified proto directory (i.e,--proto-path
or a director as an--input
).Here is an example,
proto.zip
When I generate the relevant stubs for the above proto directory as below, it won't generate the
Message2
definition, which I need to pass as agoogle.protobuf.Any
type.In addition, neither the
protoc
command did not generate it. Theprotoc
command even didn't generate theMessage1
.AFAIU, we can generate them separately and include them in a project. But in Ballerina, we cannot do that since we only have one descriptor for a given service. And that service definition cannot include descriptors other than the ones we generated. As they have mentioned here, the protoc compiler won't handle such cases. Only the gen tools do that.
However, when I use Java
io.grpc:protoc-gen-grpc-java
generation tool, it generates all the necessary messages, includingMessage1
andMessage2
. That is the behaviour we should implement in Ballerina CLI.Sample Java code
Affected Versions:
OS, DB, other environment details and versions:
The text was updated successfully, but these errors were encountered: