Skip to content

Commit

Permalink
Exclude transitive scala-library dependency
Browse files Browse the repository at this point in the history
Scaladoc depends on scala-xml, etc, built with the previous stable
version of Scala. This isn't ideal, but we're stuck with this for
now.

We were relying on Ivy to evict the transitive dependency on the
old version of scala-library. However, SBT treats evictions of
scala-library as suspicious and emits a custom warning.

This commit explicitly excludes the transitive dependency so
as to avoid these warnings. It also makes the output of `show update`
a little easier to read.
  • Loading branch information
retronym committed Mar 10, 2015
1 parent dbcedfb commit 0849761
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@
* https://groups.google.com/d/topic/scala-internals/gp5JsM1E0Fo/discussion
*/

val boostrapScalaVersion = "2.11.5"

lazy val commonSettings = Seq[Setting[_]](
organization := "org.scala-lang",
version := "2.11.6-SNAPSHOT",
scalaVersion := "2.11.5",
scalaVersion := boostrapScalaVersion,
// we don't cross build Scala itself
crossPaths := false,
// do not add Scala library jar as a dependency automatically
Expand Down Expand Up @@ -154,13 +156,13 @@ lazy val repl = configureAsSubproject(project).
settings(disableDocsAndPublishingTasks: _*).
dependsOn(compiler)

def moduleDependency(name: String) =
// exclusion of the scala-library transitive dependency avoids eviction warnings during `update`.
"org.scala-lang.modules" %% name % "1.0.3" exclude("org.scala-lang", "scala-library")

lazy val scaladoc = configureAsSubproject(project).
settings(
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-xml" % "1.0.3",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.3",
"org.scala-lang.modules" %% "scala-partest" % "1.0.5"
)
libraryDependencies ++= Seq("scala-xml", "scala-parser-combinators", "scala-partest").map(moduleDependency)
).
settings(disableDocsAndPublishingTasks: _*).
dependsOn(compiler)
Expand All @@ -179,12 +181,10 @@ lazy val asm = configureAsForkOfJavaProject(project)

lazy val root = (project in file(".")).
aggregate(library, forkjoin, reflect, compiler, asm, interactive, repl,
scaladoc, scalap).
// make the root project an aggragate-only
// we disable sbt's built-in Ivy plugin in the root project
// so it doesn't produce any artifact including not building
// an empty jar
disablePlugins(plugins.IvyPlugin)
scaladoc, scalap).settings(
scalaVersion := boostrapScalaVersion,
ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }
)

/**
* Configures passed project as a subproject (e.g. compiler or repl)
Expand Down

0 comments on commit 0849761

Please sign in to comment.