Skip to content

Conversation

@linw1995
Copy link
Contributor

@linw1995 linw1995 commented Dec 5, 2019

protoc-gen-python_grpc plugin generating file's path should handle it like protobuf.

https://github.com/protocolbuffers/protobuf/blob/4e93585e8bb234efeacb7737b8d080968c5ab91e/src/google/protobuf/compiler/python/python_generator.cc#L76-L91

it handles the trailing ".protodevel" filename, replaces "-" with "_" and replaces "/" with "." in file path as a module name.

https://github.com/protocolbuffers/protobuf/blob/4e93585e8bb234efeacb7737b8d080968c5ab91e/src/google/protobuf/compiler/python/python_generator.cc#L333-L336

and replaces "." with "/" in module name as a generated file path. it removes the character "." or "-" in the directory name of the file path to create the right path of the module.

@vmagamedov vmagamedov merged commit 3e965c3 into vmagamedov:master Dec 5, 2019
@vmagamedov
Copy link
Owner

Thanks!

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