-
Notifications
You must be signed in to change notification settings - Fork 21
Description
I'd like to provide a --prefix , such that a Template structure in thrift could be named CG_Alpha_Template. In that example, --prefix "CG_Alpha_" helps label it as "CG" as code-gen and "Alpha" as the service name.
Historically, all fields in our back-end service thrift files are optional and the front-end defines a new flow type for just the necessary fields. On top of that, two thrift files may have identical type names. Therefore, Template type can actually be the name of four unique types (4) in a particular project.
Instead, it would be nice if the four unique types had four different names so they are easily searchable by "_Template" or "Alpha_Template", but actually named:
- CG_Alpha_Template vs CG_Zeta_Template in flow type code-gen
- Alpha_Template vs Zeta_Template in our own types that are a subset of code-gen
The renaming could also be done as part of post-processing in the code-gen CLI that uses this thrift2flow library. The code-gen CLI would need some changes whether it passes a --prefix or does post-processing, so I'm also opening an issue there.
Please let me know what you think! Thank you.