Skip to content
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

Stack traces are logged to console in 0.23.12 #705

Open
rossabaker opened this issue Jun 28, 2022 · 2 comments
Open

Stack traces are logged to console in 0.23.12 #705

rossabaker opened this issue Jun 28, 2022 · 2 comments

Comments

@rossabaker
Copy link
Member

//> using scala "2.13"
//> using lib "org.http4s::http4s-blaze-server:0.23.12"
//> using lib "org.http4s::http4s-blaze-client:0.23.12"
//> using lib "org.slf4j:slf4j-nop:1.7.36"

import cats.effect._
import cats.syntax.all._
import fs2._
import org.http4s._
import org.http4s.implicits._
import org.http4s.blaze.server._
import org.http4s.blaze.client._
import scala.concurrent.duration._

object Boo extends IOApp.Simple {
  val app = HttpApp.liftF(IO.raiseError[Response[IO]](new Exception("d'oh")))

  def run =
    BlazeServerBuilder[IO].withHttpApp(app).resource.use { _ =>
      BlazeClientBuilder[IO].resource.use { client =>
        Stream(client.status(Request[IO](uri = uri"http://localhost:8080/")))
          .covary[IO]
          .map(Stream.eval)
          .repeat
          .take(16)
          .parJoin(8)
          .compile
          .drain
      }
    }
}
$ scala-cli run stacktrace.scala 2>&1 | grep -c d.oh
16

D'oh. Downgrade to 0.23.11:

$ scala-cli run stacktrace.scala 2>&1 | grep -c d.oh
0
@rossabaker
Copy link
Member Author

Actually, this fixes it:

//> using lib "org.typelevel::cats-effect:3.3.12"

@rossabaker
Copy link
Member Author

We're still seeing an exception leak after 3.3.12 upgrade that looks related to typelevel/cats-effect#2962 ... but it's not reproduced by this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant