-
-
Notifications
You must be signed in to change notification settings - Fork 77
Add async interfaces feature #113
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
Add async interfaces feature #113
Conversation
depends on #111 |
iterator methods seem really cool. the only thing that I see is not acceptable is that we depend on a non-official third-party dependency. perhaps we have some boilerplate code in our service and still match the current behavior? like we did in the experimental unary promise option? |
@thesayyn I know the async is not compatible with I would love to make my |
another method I had thought of, but would be a boatload of extra work, is to setup a build-system-esc solution with a load of hooks, so that you inject your own style of generation. This together with the |
Unfortunately, this is not up to me. your patches to the @grpc/grpc-js have to be landed on https://github.com/grpc/grpc-node. I can not force users to rely on a third-party package. that's why I proposed putting this boilerplate code to generated sources instead of using a third party package. |
yes, this could an interesting thing though. |
I understand, I cannot imagine the folks from @grpc/grpc-node are looking for a complete rewrite. So for now I'll keep the fork around and publish the patch under my own package, I already have the protoc docker image I use working with this lib, so swapping it out should be easy. |
perhaps grpc_package_name option that we have, might help you. but you still get type mismatch with official grpc package. |
you are right, that's why I use it like this: I did consider to make it so that I also considered to generate boiler plate like with the unary promise, but I dislike the idea that my runtime should suffer for programming comfort, I wanted the best of both. |
339add8
to
395b68f
Compare
653c250
to
4c3460d
Compare
upps. |
I have currently implemented this as am extra setting which is a boolean.
I would not at all be suprised if the future holds more styles of code generation, so it might be worth introducing a string option called
style
(or something along those lines) so that more styles are more easily added :D