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

chore: Add full error stack trace #156

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions frontend/src/main/scala/bloop/engine/tasks/CompileTask.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import bloop.engine.tasks.compilation._
import bloop.io.ParallelOps
import bloop.io.ParallelOps.CopyMode
import bloop.io.{Paths => BloopPaths}
import bloop.logging.BloopLogger
import bloop.logging.DebugFilter
import bloop.logging.Logger
import bloop.logging.LoggerAction
Expand All @@ -36,7 +37,6 @@ import bloop.tracing.BraveTracer
import monix.execution.CancelableFuture
import monix.reactive.MulticastStrategy
import monix.reactive.Observable

object CompileTask {
private implicit val logContext: DebugFilter = DebugFilter.Compilation
def compile[UseSiteLogger <: Logger](
Expand Down Expand Up @@ -292,10 +292,8 @@ object CompileTask {
} else {
results.foreach {
case FinalNormalCompileResult.HasException(project, err) =>
val errMsg = err.fold(identity, _.getMessage)
rawLogger.error(s"Unexpected error when compiling ${project.name}: '$errMsg'")
err.foreach(_.printStackTrace(System.err))
err.foreach(rawLogger.trace(_))
val errMsg = err.fold(identity, BloopLogger.prettyPrintException)
rawLogger.error(s"Unexpected error when compiling ${project.name}: $errMsg")
case _ => () // Do nothing when the final compilation result is not an actual error
}

Expand Down