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 proto file's path configuration #88

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nethibernate
Copy link

modified the generating logic, use proto fixed dir instead of proto's parent dir;

…fig;

modified the generating logic, use proto fixed dir instead of proto's parent dir;
@tcripps
Copy link
Collaborator

tcripps commented Apr 7, 2016

Can you please describe the goal of this change? What is the use case that it solves?

@nethibernate
Copy link
Author

Ok, I will try to describe the scenario I have met.
Below is my proto module's structures:
proto_module
|----protos
   |----google
      |----protobuf
         |----descriptor.proto
   |----A.proto
   |----B.proto
|----src

When the plugin invokes the protoc to compile all the proto files, it should specifies the parameter "--proto_path", so the "proto_path" of descriptor.proto above is "proto_module/protos/google/protobuf/". Using this "proto_path" will cause protobuf's security check exception when I run the program and the program wants to initialize any generated proto class.

This pull request added a text box to let users specify a fixed root path where all the proto files are. When the plugin compiles the files, it will use the specified path for every proto file instead of the proto file's own path. In this case, it won't cause any security check exception.

Make it be compatible to 2017.1
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

Successfully merging this pull request may close these issues.

2 participants