Spinoco / fs2-http

Http Server and client using fs2
MIT License
135 stars 26 forks source link

Runtime error with fs2 v2.0.0 #40

Open marko-asplund opened 5 years ago

marko-asplund commented 5 years ago

I'd need to use fs2-http with fs2 v2.0.0, but I'm getting the following runtime error:

Exception in thread "specs2.user-14" java.lang.NoSuchMethodError: fs2.io.tcp.package$.client$default$2()Z
    at spinoco.fs2.http.websocket.WebSocket$.$anonfun$client$1(WebSocket.scala:98)
    at spinoco.fs2.http.websocket.WebSocket$.$anonfun$client$1$adapted(WebSocket.scala:97)
    at fs2.Stream$.$anonfun$flatMap$1(Stream.scala:1091)
    at fs2.internal.FreeC$$anon$1.cont(FreeC.scala:31)
    at fs2.internal.FreeC$ViewL$$anon$9$$anon$10.cont(FreeC.scala:239)
    at fs2.internal.FreeC$ViewL$.mk(FreeC.scala:228)
    at fs2.internal.FreeC$ViewL$.apply(FreeC.scala:220)
    at fs2.internal.FreeC.viewL(FreeC.scala:77)
    at fs2.internal.Algebra$.fs2$internal$Algebra$$go$1(Algebra.scala:228)
    at fs2.internal.Algebra$$anon$2.$anonfun$out$1(Algebra.scala:279)
    at fs2.internal.Algebra$.$anonfun$compileLoop$1(Algebra.scala:247)
    at cats.effect.internals.IORunLoop$.cats$effect$internals$IORunLoop$$loop(IORunLoop.scala:139)
    at cats.effect.internals.IORunLoop$RestartCallback.signal(IORunLoop.scala:355)
    at cats.effect.internals.IORunLoop$RestartCallback.run(IORunLoop.scala:366)
    at cats.effect.internals.Trampoline.cats$effect$internals$Trampoline$$immediateLoop(Trampoline.scala:70)
    at cats.effect.internals.Trampoline.startLoop(Trampoline.scala:36)
    at cats.effect.internals.TrampolineEC$JVMTrampoline.super$startLoop(TrampolineEC.scala:93)
    at cats.effect.internals.TrampolineEC$JVMTrampoline.$anonfun$startLoop$1(TrampolineEC.scala:93)
    at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
...

this is with v0.4.1.

s5bug commented 5 years ago

The way sockets work was changed in fs2 2.0.0. You'll have to stick to 1.x for now.

marko-asplund commented 5 years ago

I tried to address this issue with PR #41.