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

Incompatible with ServiceProxy:Proxy methods must have void or Fluent returns #43

Open
AndierZ opened this issue Nov 14, 2019 · 2 comments

Comments

@AndierZ
Copy link

AndierZ commented Nov 14, 2019

First of all I really appreciate the work that people did here. I really liked the concept of completable future and was going to replace all my AsyncResult callbacks with VertxCompletableFuture, but then I realized that the code gen for proxy service won't work because of the error in the title. I realized that this is not a problem of VertxCompletableFuture per se, but figured this might be a relevant place to ask..

It was a real bummer because if it worked it would make things so much cleaner.. I was able to shorten my code by like 40%..

Any suggestion as to work arounds? Any hope that Vertx Core will modify the code gen to allow this?

Regards,
Andier

@AndierZ
Copy link
Author

AndierZ commented Nov 15, 2019

Spend some more time looking for alternatives. Looks like the most promising way is to do what Vertx team did with the rxJava - build a codegen to create a wrapper which uses the actual service as a delegate and then returns a VertxCompletableFuture? Does that sound reasonable? I could give that a shot.

For some reason I still prefer CompletableFuture over rxJava.. its api feels slightly neater..

@cescoffier
Copy link
Owner

Unfortunately, the only solution would be to implement the code-generation tool from the service proxies to use CompletionFuture.

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

2 participants