Skip to content

Fix classpath within of SBT build #22

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,7 @@
/qbin

# Sbt's target directories
**/target/
/target/
/project/target/
/project/project/target
/build-sbt/
26 changes: 7 additions & 19 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,18 @@

val bootstrapScalaVersion = "2.11.5"

def withoutScalaLang(moduleId: ModuleID): ModuleID = moduleId exclude("org.scala-lang", "*")

// exclusion of the scala-library transitive dependency avoids eviction warnings during `update`.
val scalaParserCombinatorsDep = "org.scala-lang.modules" %% "scala-parser-combinators" % versionNumber("scala-parser-combinators") exclude("org.scala-lang", "scala-library")
val scalaXmlDep = "org.scala-lang.modules" %% "scala-xml" % versionNumber("scala-xml") exclude("org.scala-lang", "scala-library")
val partestDep = "org.scala-lang.modules" %% "scala-partest" % versionNumber("partest") exclude("org.scala-lang", "scala-library")
val partestInterfaceDep = "org.scala-lang.modules" %% "scala-partest-interface" % "0.5.0" exclude("org.scala-lang", "scala-library")
val scalaParserCombinatorsDep = withoutScalaLang("org.scala-lang.modules" %% "scala-parser-combinators" % versionNumber("scala-parser-combinators"))
val scalaXmlDep = withoutScalaLang("org.scala-lang.modules" %% "scala-xml" % versionNumber("scala-xml"))
val partestDep = withoutScalaLang("org.scala-lang.modules" %% "scala-partest" % versionNumber("partest"))
val partestInterfaceDep = withoutScalaLang("org.scala-lang.modules" %% "scala-partest-interface" % "0.5.0")
val junitDep = "junit" % "junit" % "4.11"
val junitIntefaceDep = "com.novocode" % "junit-interface" % "0.11" % "test"
val jlineDep = "jline" % "jline" % versionProps("jline.version")
val antDep = "org.apache.ant" % "ant" % "1.9.4"
val scalacheckDep = "org.scalacheck" %% "scalacheck" % "1.11.4" exclude("org.scala-lang", "scala-library")
val scalacheckDep = withoutScalaLang("org.scalacheck" %% "scalacheck" % "1.11.4")

lazy val commonSettings = clearSourceAndResourceDirectories ++ Seq[Setting[_]](
organization := "org.scala-lang",
Expand Down Expand Up @@ -181,10 +183,6 @@ lazy val compiler = configureAsSubproject(project)

lazy val interactive = configureAsSubproject(project)
.settings(disableDocsAndPublishingTasks: _*)
.settings(
scalaVersion := bootstrapScalaVersion,
ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }
)
.dependsOn(compiler)

lazy val repl = configureAsSubproject(project)
Expand Down Expand Up @@ -217,8 +215,6 @@ lazy val partestExtras = configureAsSubproject(Project("partest-extras", file(".
.dependsOn(repl)
.settings(clearSourceAndResourceDirectories: _*)
.settings(
scalaVersion := bootstrapScalaVersion,
ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) },
libraryDependencies += partestDep,
unmanagedSourceDirectories in Compile := List(baseDirectory.value)
)
Expand All @@ -228,8 +224,6 @@ lazy val junit = project.in(file("test") / "junit")
.settings(clearSourceAndResourceDirectories: _*)
.settings(commonSettings: _*)
.settings(
scalaVersion := bootstrapScalaVersion,
ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) },
fork in Test := true,
libraryDependencies ++= Seq(junitDep, junitIntefaceDep),
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v"),
Expand All @@ -243,8 +237,6 @@ lazy val partestJavaAgent = (project in file(".") / "src" / "partest-javaagent")
doc := file("!!! NO DOCS !!!"),
publishLocal := {},
publish := {},
scalaVersion := bootstrapScalaVersion,
ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) },
// Setting name to "scala-partest-javaagent" so that the jar file gets that name, which the Runner relies on
name := "scala-partest-javaagent",
// writing jar file to $buildDirectory/pack/lib because that's where it's expected to be found
Expand All @@ -263,8 +255,6 @@ lazy val test = project.
settings(commonSettings: _*).
settings(Defaults.itSettings: _*).
settings(
scalaVersion := bootstrapScalaVersion,
ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) },
libraryDependencies ++= Seq(partestDep, scalaXmlDep, partestInterfaceDep, scalacheckDep),
unmanagedBase in Test := baseDirectory.value / "files" / "lib",
unmanagedJars in Test <+= (unmanagedBase) (j => Attributed.blank(j)) map(identity),
Expand All @@ -291,8 +281,6 @@ lazy val test = project.
lazy val root = (project in file(".")).
aggregate(library, forkjoin, reflect, compiler, asm, interactive, repl,
scaladoc, scalap, actors, partestExtras, junit).settings(
scalaVersion := bootstrapScalaVersion,
ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) },
sources in Compile := Seq.empty,
onLoadMessage := """|*** Welcome to the sbt build definition for Scala! ***
|This build definition has an EXPERIMENTAL status. If you are not
Expand Down
1 change: 0 additions & 1 deletion test/junit/scala/collection/mutable/VectorTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class VectorTest {
def iteratorCat() {
def its = vecs.map(_.toList.toIterator)
val cats = vecs.map(a => its.map(a ++ _))
println(cats)
assert( cats == ans )
}

Expand Down