-
Notifications
You must be signed in to change notification settings - Fork 781
Support compiling multiple .proto files with a single command #245
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
Comments
There's kind of a precedent for not doing this unfortunately: golang/protobuf#39 |
That issue refers to:
I have a single package that is defined across multiple |
Ah ok, slightly different issue then. Sorry for any confusion. |
Can you give me an example of your use case? Something abbreviated like below, but illustrating what you mean by "single package that is defined across multiple
As much details is appreciated. |
Here is an example with two separate services defined in the same package. It also relates to #244:
// Copyright 2018. All rights reserved.
syntax = "proto3";
package myproject.myapi.v1;
import "google/protobuf/wrappers.proto";
service ServiceA {
rpc MethodA (google.protobuf.StringValue) returns (google.protobuf.StringValue);
}
// Copyright 2018. All rights reserved.
syntax = "proto3";
package myproject.myapi.v1;
import "google/protobuf/wrappers.proto";
service ServiceB {
rpc MethodB (google.protobuf.StringValue) returns (google.protobuf.StringValue);
} With
This is possible with the aforementioned
However, with Perhaps the |
I'm looking for similar but, In my case, serviceA/a.proto I can build these all by one command |
This is worked for me |
protoc
supports passing multiple.proto
files with a single call. Typically, the output directory is specified and the file names are based on the names of the.proto
files.Currently, if more than one
service
is defined in more than one.proto
file,protoc
returns an error:The text was updated successfully, but these errors were encountered: