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

Introduce option to customize generation (only services, only clients, or both) #17

Closed
darronschall opened this issue May 14, 2024 · 0 comments · Fixed by #23
Closed
Labels
enhancement New feature or request

Comments

@darronschall
Copy link
Contributor

darronschall commented May 14, 2024

Introduce an option, something like generate=<service|client|both>, to configure what code the plugin should generate.

  • generate=service - only generate the ::Twirp::Service subclass.
  • generate=client - only generate the ::Twirp::Client subclass.
  • generate=both - generate both. Default option for backwards compatibility (and current behavior).

For generate=client, we don't want to use the client_for DSL because we do not have a service class reference to pass in (because one was not generated). Instead, we'll need to configure the client "manually".

@darronschall darronschall added the enhancement New feature or request label May 14, 2024
@darronschall darronschall changed the title Introduce option to allow skipping client generation Introduce option to customize generation (only services, only clients, or both) May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant