Skip to content

version 3.3.1 doesn't properly terminate on error in SBT #2704

@nikiforo

Description

@nikiforo

build.sbt

ThisBuild / scalaVersion := "2.13.7"
ThisBuild / organization := "org.example"

val commonSettings = Seq(
  version := "0.0.1",
  scalacOptions ++= Seq("-deprecation", "-Xfatal-warnings")
)

val root = (project in file("."))
  .settings(commonSettings)
  .settings(
    name := "ds",
    libraryDependencies += "org.typelevel" %% "cats-effect" % "3.3.1"
  )

Main.scala

object Main extends IOApp.Simple {

  def run: IO[Unit] =
    IO.raiseError(new RuntimeException)
}
% sbt
[info] welcome to sbt 1.5.5 (Oracle Corporation Java 13.0.1)
> run

Expected behavior: IOApp completes with error, sbt is usable
Actual behavior: IOApp completes with error, sbt starts consuming all available CPU(up to 800% on my PC)

After I change ce3 version to 3.3.0 the problem disappears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions