You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plugin maps proto filenames to python module names in a predicable manner according to _type_names and other functions. This results in import statements like:
In our case as an artifact of the build system (bazel), the well-known types (and some other types) have alternate desired module name mappings. The desired import would be something like:
I would suggest a "mapping" option that allows the end-user to do such a mapping. Other protoc plugins have the same requirement. For protoc-gen-go, for example, has the M option.
The plugin maps proto filenames to python module names in a predicable manner according to _type_names and other functions. This results in import statements like:
In our case as an artifact of the build system (bazel), the well-known types (and some other types) have alternate desired module name mappings. The desired import would be something like:
I would suggest a "mapping" option that allows the end-user to do such a mapping. Other protoc plugins have the same requirement. For
protoc-gen-go
, for example, has theM
option.For example:
Would parse the option, do a lookup in the type map, and produce the output:
Happy to create a PR to implement it, and thanks for the great plugin!
The text was updated successfully, but these errors were encountered: