These are chat archives for hseeberger/akka-http-json

18th
Mar 2017
Alexander Semenov
@Tvaroh
Mar 18 2017 10:09
Why Circe RootEncoder is now required instead of Encoder for the marshaller? Huge PITA to update all the code.

any hope of getting back something like

implicit final def marshaller[A: Encoder]: ToEntityMarshaller[A] =
    jsonMarshaller.compose(implicitly[Encoder[A]].apply)

?

Heiko Seeberger
@hseeberger
Mar 18 2017 11:21
Please explain where you have issues with the RootEncoder.
Alexander Semenov
@Tvaroh
Mar 18 2017 11:22
I don't have RootEncoder instances for my models, only Encoder ones, and I'm pretty happy with them. I see no reason why ToEntityMarshaller should not be able to marshall e.g. Booleans and any classes with Encoder instances in general
Heiko Seeberger
@hseeberger
Mar 18 2017 11:45
@Tvaroh I think you are right. @lomigmegard, you have introduced the change to RootEncoder: could you please explain the reasons for that?
Alexander Semenov
@Tvaroh
Mar 18 2017 17:10
@hseeberger if it helps: hseeberger/akka-http-json#134

Btw sbt test fails with

org.scalafmt.bootstrap.FetchError: ArrayBuffer((Dependency(com.geirsson:scalafmt-cli_2.11,0.6.2,compile,Set(),Attributes(jar,),false,true),List(not found: /Users/tvaroh/.ivy2/local/com.geirsson/scalafmt-cli_2.11/0.6.2/ivys/ivy.xml, locked: /Users/tvaroh/.coursier/cache/v1/https/repo1.maven.org/maven2/com/geirsson/scalafmt-cli_2.11/0.6.2/scalafmt-cli_2.11-0.6.2.pom)))

When run the second time, it fails with java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Metaspace that can be fixed by adding an .sbtopts file with similar content:

-J-Xmx4G
-J-XX:MaxMetaspaceSize=1G
-J-XX:+CMSClassUnloadingEnabled