-
Notifications
You must be signed in to change notification settings - Fork 309
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 scala3 support for spray json #2181
Conversation
Discussed here #2179 |
Thanks! Testing is a problem, due to Scala.JS+Chrome, which doesn't release memory or something like that. It's a problem known for a couple of years without a resolution ;) There's a work-around in the readme, bascially you need to run only a subset of tests:
But if the code compiles, that 90% of success ;) As for formatting - yes, we should get an additional build step which verifies that files are properly formatted, although nobody got to it yet ;) |
It seems there's a compilation error: [error] -- [E172] Type Error: /home/runner/work/sttp/sttp/json/spray-json/src/test/scala/sttp/client4/SprayJsonTests.scala:85:105
[error] 85 | val request: Request[Either[String, String]] = basicRequest.get(Uri("http://example.org/")).body(json)
[error] | ^
[error] |No given instance of type sttp.client4.BodySerializer[spray.json.JsObject] was found for a context parameter of method body in trait PartialRequestExtensions.
[error] |I found:
[error] |
[error] | sttp.client4.sprayJson.sprayBodySerializer[B]()
[error] |
[error] |But method sprayBodySerializer in trait SttpSprayJsonApi does not match type sttp.client4.BodySerializer[spray.json.JsObject].
[error] one error found |
04782da
to
43756f4
Compare
Hi, It seems, this can be resolved by adding this implicit for scala3
This build is now ✅ I did another branch forking from 3.9.6 for the client3, without these issues. |
scala3 should run locally :) Are you compiling from the sbt console? It should be aggregated in the main build, but you can also switch projects (when in sbt console) by typing |
Thanks, yes, figured out how to run it locally with Scala 3 in the sbt console now |
Ok, great, maybe we do need some better docs on how to do this :) |
Before submitting pull request:
sbt compile
sbt compileDocs
sbt test
sbt scalafmt
Tests could not complete because of OOM issues. Just ran this with standard settings on an M3 Macbook. Any common tips or tricks used here?
Running sbtformat yielded format changed for files i did not touch.