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

The output module name used by protoc-gen-twirp_haskell is too restrictive #24

Open
neilmayhew opened this issue Sep 29, 2020 · 0 comments

Comments

@neilmayhew
Copy link
Contributor

  1. The pascalCase applied to package names isn't always appropriate. I'm using a package name of Product.RPC.Service in my proto file, and I want that to be the package name of the generated API module. However, protoc-gen-twirp_haskell changes it to Product.Rpc.Service which doesn't fit with our project's naming conventions.

  2. proto-lens-protoc puts its output into Proto.* regardless of the package name. I guess I should make an issue for this in proto-lens-protoc.

I'm solving (1) by specifying the output directory I want and then changing the module name in the generated source using a post-processing step after running protoc. I could do something similar for (2) but it would be more complicated so I've left it alone for now.

A possible solution for (1) would be to examine the first character of each dot-separated segment and make no changes if it's already capitalized.

I can see that there's some commented-out code for handling "API" specially, so presumably this issue has come up before.

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

No branches or pull requests

1 participant