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

Add missing hrpc.proto for generation of schema.proto? #3

Open
decentral1se opened this issue Aug 8, 2020 · 4 comments
Open

Add missing hrpc.proto for generation of schema.proto? #3

decentral1se opened this issue Aug 8, 2020 · 4 comments

Comments

@decentral1se
Copy link

So, as I followed in mafintosh/hrpc#1, there needs to be a hrpc.proto file present in the root of this repostory when generating the schema.proto services and stubs or otherwise a lot of errors appear:

(.venv) ➜  rpc (master) ✗ python -m grpc_tools.protoc --purerpc_out=. --python_out=. -I. schema.proto
hrpc.proto: File not found.
schema.proto:4:1: Import "hrpc.proto" was not found or had errors.
schema.proto:224:15: "hrpc.Void" is not defined.
schema.proto:234:35: "hrpc.Void" is not defined.
schema.proto:243:39: "hrpc.Void" is not defined.
schema.proto:246:39: "hrpc.Void" is not defined.
schema.proto:247:43: "hrpc.Void" is not defined.
schema.proto:249:47: "hrpc.Void" is not defined.
schema.proto:250:37: "hrpc.Void" is not defined.
schema.proto:251:61: "hrpc.Void" is not defined.
schema.proto:252:65: "hrpc.Void" is not defined.
schema.proto:253:49: "hrpc.Void" is not defined.
schema.proto:255:42: "hrpc.Void" is not defined.
schema.proto:256:42: "hrpc.Void" is not defined.
schema.proto:259:39: "hrpc.Void" is not defined.
schema.proto:260:37: "hrpc.Void" is not defined.
schema.proto:261:39: "hrpc.Void" is not defined.
schema.proto:262:41: "hrpc.Void" is not defined.
schema.proto:263:47: "hrpc.Void" is not defined.
schema.proto:264:35: "hrpc.Void" is not defined.
schema.proto:271:13: "hrpc.Void" is not defined.
schema.proto:274:20: "hrpc.Void" is not defined.
schema.proto:275:61: "hrpc.Void" is not defined.
schema.proto:276:65: "hrpc.Void" is not defined.
schema.proto:277:49: "hrpc.Void" is not defined.
schema.proto:280:38: "hrpc.Void" is not defined.
schema.proto:281:41: "hrpc.Void" is not defined.
schema.proto:282:47: "hrpc.Void" is not defined.

But by adding the hrpc.proto, it all generates nicely. I guess we need to add that in here or?

@decentral1se
Copy link
Author

For reference, https://gist.github.com/Frando/45a735baa954ba8abae56c76af6fc74b:

syntax = "proto2";

package hrpc;

import "google/protobuf/descriptor.proto";

extend google.protobuf.ServiceOptions {
  optional uint32 service = 50000;
}
extend google.protobuf.MethodOptions {
  optional uint32 method = 50001;
}

message Void {}

@decentral1se decentral1se mentioned this issue Aug 8, 2020
2 tasks
@mafintosh
Copy link
Contributor

We can it here if it helps. Just needs to be an empty message

@decentral1se
Copy link
Author

I'm easy, I can move on with my stuff, I guess I just wanted to flag that it might catch others trying to generate service/stubs.

@frafra
Copy link

frafra commented Jan 30, 2021

Could such file be added to this repository?

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

3 participants