summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2016-05-10 15:07:45 +1000
committerJason Zaugg <jzaugg@gmail.com>2016-05-16 16:18:15 +1000
commit83864872d7b642520fdf522fd300151d8bc22da4 (patch)
tree152dcbd19d16d798bb9da8204a49bc90f38fa09e
parentcf3850626a62ce7aefad129b3af5c8184c7226a6 (diff)
downloadscala-83864872d7b642520fdf522fd300151d8bc22da4.tar.gz
scala-83864872d7b642520fdf522fd300151d8bc22da4.tar.bz2
scala-83864872d7b642520fdf522fd300151d8bc22da4.zip
Eliminate major sources of daily noise in SBT build.
- Intercept incorrect "binary conflict" warning issued by SBT. Fixes https://github.com/scala/scala-dev/issues/100 - Bump to a new version of pantsbuild/jarjar to fix an incompatibility with Java 8 parameter names in class files, which we run into on the 2.12.x branch. See: https://github.com/pantsbuild/jarjar/pull/19 - Disable info level logging for dependency resolve/download.
-rw-r--r--build.sbt10
-rw-r--r--project/Quiet.scala33
-rw-r--r--project/plugins.sbt2
3 files changed, 41 insertions, 4 deletions
diff --git a/build.sbt b/build.sbt
index 5b9036deb4..e2cf40dbbc 100644
--- a/build.sbt
+++ b/build.sbt
@@ -210,7 +210,9 @@ lazy val commonSettings = clearSourceAndResourceDirectories ++ publishSettings +
// Don't log process output (e.g. of forked `compiler/runMain ...Main`), just pass it
// directly to stdout
- outputStrategy in run := Some(StdoutOutput)
+ outputStrategy in run := Some(StdoutOutput),
+ Quiet.silenceScalaBinaryVersionWarning,
+ Quiet.silenceIvyUpdateInfoLogging
)
/** Extra post-processing for the published POM files. These are needed to create POMs that
@@ -475,6 +477,7 @@ lazy val replJlineEmbedded = Project("repl-jline-embedded", file(".") / "target"
}),
publishArtifact := false,
connectInput in run := true
+
)
.dependsOn(replJline)
@@ -677,8 +680,9 @@ lazy val root = (project in file("."))
publishArtifact := false,
publish := {},
publishLocal := {},
- commands ++= ScriptCommands.all
- )
+ commands ++= ScriptCommands.all,
+ Quiet.silenceIvyUpdateInfoLogging
+)
.aggregate(library, forkjoin, reflect, compiler, interactive, repl, replJline, replJlineEmbedded,
scaladoc, scalap, actors, partestExtras, junit, libraryAll, scalaDist).settings(
sources in Compile := Seq.empty,
diff --git a/project/Quiet.scala b/project/Quiet.scala
new file mode 100644
index 0000000000..de30ebe6ab
--- /dev/null
+++ b/project/Quiet.scala
@@ -0,0 +1,33 @@
+import sbt._
+import Keys._
+
+object Quiet {
+ // Workaround SBT issue described:
+ //
+ // https://github.com/scala/scala-dev/issues/100
+ def silenceScalaBinaryVersionWarning = ivyConfiguration := {
+ ivyConfiguration.value match {
+ case c: InlineIvyConfiguration =>
+ val delegate = c.log
+ val logger = new Logger {
+ override def trace(t: => Throwable): Unit = delegate.trace(t)
+ override def log(level: sbt.Level.Value, message: => String): Unit = {
+ level match {
+ case sbt.Level.Warn =>
+ val message0 = message
+ val newLevel = if (message.contains("differs from Scala binary version in project"))
+ delegate.log(sbt.Level.Debug, message)
+ else
+ delegate.log(level, message)
+ case _ => delegate.log(level, message)
+ }
+ }
+ override def success(message: => String): Unit = delegate.success(message)
+ }
+ new InlineIvyConfiguration(c.paths, c.resolvers, c.otherResolvers, c.moduleConfigurations, c.localOnly, c.lock, c.checksums, c.resolutionCacheDir, c.updateOptions, logger)
+ case x => x
+ }
+ }
+
+ def silenceIvyUpdateInfoLogging = logLevel in update := Level.Warn
+}
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 2d91c2306b..46203565b4 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,6 +1,6 @@
libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.3.2"
-libraryDependencies += "org.pantsbuild" % "jarjar" % "1.6.0"
+libraryDependencies += "org.pantsbuild" % "jarjar" % "1.6.3"
libraryDependencies += "biz.aQute" % "bndlib" % "1.50.0"