question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

version 3.3.1 doesn't properly terminate on error in SBT

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
vasilmkdcommented, Dec 30, 2021

CE3 3.3.2 crashes sbt 1.6.x completely using this IOApp.

1reaction
vasilmkdcommented, Jan 4, 2022

Sbt 1.6.0 is not actually killed, it just lacks the code to trap System.exit (i.e. it’s a feature, not a bug).

Read more comments on GitHub >

github_iconTop Results From Across the Web

sbt run failed spark@3.2.1 - scala - Stack Overflow
I maded a simple spark app in this repository, where sbt run always report errors as. Exception in thread "Thread-2" java.lang.
Read more >
Update to ncurses causes sbt to throw an exception on startup
After upgrading ncurses , starting sbt shows the following error: amu ~ >sbt [ERROR] Failed to construct terminal; falling back to unsupported ...
Read more >
IntelliJ IDEA - Troubleshoot common Scala issues - JetBrains
In most cases your project JDK is not compatible with Scala or sbt version, try to change the Scala Compile Server SDK. Press...
Read more >
sbt Reference Manual — Combined Pages
To leave sbt shell, type exit or use Ctrl+D (Unix) or Ctrl+Z (Windows). sbt:foo-build> exit. Compile a project. As a convention, we will...
Read more >
Load Testing with Gatling - The Complete Guide | James Willett
This post is a complete guide to load testing with Gatling, from installation and configuration to writing and executing your first tests.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found