Closed bilal-fazlani closed 3 years ago
Only circe 0.14.0-M3 is published for scala3, and there are some incompatible changes:
[error] -- Error: sttp/json/circe/src/test/scala/sttp/client3/circe/CirceTests.scala:17:37
[error] 17 | val req = basicRequest.body(body)
[error] | ^
[error] |no implicit argument of type sttp.client3.BodySerializer[CirceTests.this.Outer] was found for an implicit parameter of method body in trait RequestTExtensions.
[error] |I found:
[error] |
[error] | sttp.client3.circe.circeBodySerializer[CirceTests.this.Outer](this.Outer.encoder
[error] | ,
[error] | /* missing */summon[io.circe.Printer])
[error] |
[error] |But no implicit values were found that match type io.circe.Printer.
so I suppose I'll have to wait until 0.14 to release for scala3 (and scala2 alike)
We could do separate sources, but now after upgrading to Scala3-RC1, circe isn't published yet
I guess it's worth waiting. Thanks 👍
0.14.0-M4 is out now, with 3.0.0-RC1 support.
The error seems to come from default implicit arguments here:
implicit def circeBodySerializer[B](implicit
encoder: Encoder[B],
printer: Printer = Printer.noSpaces
): BodySerializer[B]
anybody knows if this changed somehow in Scala3? The 3-RC1 compiler can't find the printer
implicit, though it has a default value
I fought a bit with that as well, without getting anywhere. I couldn't find a relevant changelog or reproduce it in a smaller example.
Hah, I was just preparing to commit a workaround for this. :D
Was it the same workaround? :)
Yep. I filed a bug in the dotty repo as well, but it's not really easy to create a minimal reproduction of it.
Ah, good that you let the dotty team know. Thanks! :)
Released in 3.1.5
results into