-
Notifications
You must be signed in to change notification settings - Fork 6
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
Future[T] and Promise[T] as Controller ReturnTypes #51
base: main
Are you sure you want to change the base?
Conversation
I've reworked this PR so that everything that resolves around using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PRs, it's nice to see some activity in this project.
I added some suggestions, some of them minor, some of them not so much :).
...c/main/scala/io/quarkiverse/scala/scala3/futures/deployment/Scala3FutureResponseHandler.java
Outdated
Show resolved
Hide resolved
futures/runtime/src/main/resources/META-INF/quarkus-extension.yaml
Outdated
Show resolved
Hide resolved
...c/main/scala/io/quarkiverse/scala/scala3/futures/deployment/Scala3FutureResponseHandler.java
Outdated
Show resolved
Hide resolved
...cala/io/quarkiverse/scala/scala3/futures/deployment/Scala3FutureReturnTypeMethodScanner.java
Outdated
Show resolved
Hide resolved
BTW, I suggest we get this one in shape and merged, before applying the same changes to the ZIO PR. |
Co-authored-by: Guillaume Smet <guillaume.smet@gmail.com>
Co-authored-by: Guillaume Smet <guillaume.smet@gmail.com>
Co-authored-by: Guillaume Smet <guillaume.smet@gmail.com>
Disclaimer: I have no knowledge of Scala, so please don't hesitate to push back if what I say doesn't make sense :). BTW, I think you could put everything in the same module. The build item machinery should be clever enough to not trigger the loading of the classes you added if the Quarkus REST extension is not around. I think that would have my preference if you can make it work as the experience will be better for the users. |
@gsmet I've updated the PR, please have a look. I noticed that I don't get the stack trace in the native executable in case of an error, so I removed the check on the body (in the tests). |
Hey folks, any news on this? |
I think I've applied everything that was requested, but maybe I missed something. |
This PR adds support for
Future[T]
andPromise[T]
as return types in resources, e.g.I also added tests in the integration module and converted them to be in Scala