Skip to content
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 does not work if proto contains imports (and fails on simple case) #272

Open
rogchap opened this issue Feb 15, 2020 · 1 comment
Open

Comments

@rogchap
Copy link

rogchap commented Feb 15, 2020

Describe the bug
I was unable to get a simple gRPC example working. There also seems to be issues if you import any messages and also does not work with any well known proto types eg. google.protobuf.Timestamp

To Reproduce
Simple proto causes this error when trying to select a request from the dropdown:
image

syntax = "proto3";
package main;

service ClickE {
    rpc Inc(Empty) returns (Count);
    rpc GetCount(Empty) returns (Count);
    rpc Subscribe(Empty) returns (stream Count);
}

message Empty {}

message Count {
    int32 value = 1;
}

Also any proto that has an import statement will fail to read the methods:

syntax="proto3";
import "message.proto";
import "google/protobuf/timestamp.proto";
package messenger;

Expected behavior

  1. The first example shoud "just work", and the error message does not give me any information on what the problem is.

  2. import statements should be followed and well known types should be automatically discovered. Most gRPC tools allow you to specify multiple proto files and also reference folders on where to read other imported files.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: MacOS Catalina
  • Browser ?? why this is relevant?
  • Version 0.4

Additional context
More testing is required around gRPC to make this useful beyond the very simple case.

I also make use of custom options in my gRPC services, which also may cause issues with your custom parser eg:

message Chat {
    google.protobuf.Timestamp created_at = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
}
@danst3in
Copy link
Contributor

@rogchap thank you for the detailed feedback! We greatly appreciate that you tested several use cases and described your issues so thoroughly.

I believe the first issue you mentioned is failing because there are no defined properties in the message type named "Empty". We should be able to fix that shortly and we should add it to our testing cases.

Support for importing files from within the proto files may take a bit longer to implement, but we will start working on it. I would say the same for custom options at this time, but we will put in some research and possibly follow-up with some more questions for you depending on what we find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants