-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
sample hangs if Scala 3 is used #3
Comments
I have a simpler version of the sample in https://github.com/pjfanning/swagger-pekko-http-sample/tree/scala3 (ie this repo but Use This hangs with Scala 3 but switch the build.sbt to Scala 2.13.15 and restart the HTTP server. The curl command then works fine. Switching to Pekko 1.0 does not alter the result. The Scala 3 hang still happens. |
I kept stripping out parts of the code and the issue remained. The final thing that I removed and that then fixed the sample was removing the CORS code in the Rest object. If I remove that, the sample runs ok in Scala 3. |
The problem is that you |
(The stack trace from |
The problem is this:
which desugars to something like
where you recreate the service on every call and therefore close over |
Seen with Scala 3.3.4 and 3.5.1. HTTP requests to http://localhost:12345/api-docs/swagger.json hang.
Reported initially by @luksow - theiterators/kebs#282 (comment)
The text was updated successfully, but these errors were encountered: