rho
rho copied to clipboard
Example doesn't compile: Divergent implicit
I extracted the swagger example in its own Sbt project and I get the following compilation error:
info] Compiling 4 Scala sources to /Users/dragos/sandbox/rho-example/target/scala-2.12/classes...
[error] /Users/dragos/sandbox/rho-example/src/main/scala/com/http4s/rho/swagger/demo/MyService.scala:32: diverging implicit expansion for type org.http4s.rho.bits.HListToFunc[shapeless.HNil,fs2.Task[com.http4s.rho.swagger.demo.MyService.TemporaryRedirect.T]]
[error] starting with value serverSentEventEncoder in trait EntityEncoderInstances
[error] GET |>> TemporaryRedirect(Uri(path="/swagger-ui"))
[error] ^
[error] one error found
[error] (compile:compileIncremental) Compilation failed
[error] Total time: 7 s, completed Oct 4, 2017 6:17:19 PM
I used the following build file, and the files under src/main/scala
are exactly the files in the rho-examples/../swagger:
scalaVersion := "2.12.3"
name := "rho-example"
resolvers += Resolver.sonatypeRepo("snapshots")
val http4sVersion = "0.17.1"
libraryDependencies ++= Seq(
"org.http4s" %% "rho-swagger" % "0.17.1-SNAPSHOT",
"org.http4s" %% "http4s-blaze-server" % http4sVersion,
"org.http4s" %% "http4s-dsl" % http4sVersion,
"org.json4s" %% "json4s-ext" % "3.5.3"
)
Could you check if you still have this problem with 0.18.0-M1
?