diff options
Diffstat (limited to 'project')
-rw-r--r-- | project/SparkBuild.scala | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index 8f0f310ddd..766edd9500 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -164,7 +164,7 @@ object SparkBuild extends PomBuild { // Code snippet taken from https://issues.scala-lang.org/browse/SI-8410. compile in Compile := { val analysis = (compile in Compile).value - val s = streams.value + val out = streams.value def logProblem(l: (=> String) => Unit, f: File, p: xsbti.Problem) = { l(f.toString + ":" + p.position.line.fold("")(_ + ":") + " " + p.message) @@ -181,7 +181,14 @@ object SparkBuild extends PomBuild { failed = failed + 1 } - logProblem(if (deprecation) s.log.warn else s.log.error, k, p) + val printer: (=> String) => Unit = s => if (deprecation) { + out.log.warn(s) + } else { + out.log.error("[warn] " + s) + } + + logProblem(printer, k, p) + } } |