update to Scala 2.9.2

This commit is contained in:
Mark Harrah 2012-04-13 17:47:12 -04:00
parent 4de26c1195
commit 13d3e7dde3
8 changed files with 17 additions and 19 deletions

View File

@ -12,9 +12,9 @@ object ScalaProviderTest extends Specification
def provide = addToSusVerb("provide") def provide = addToSusVerb("provide")
"Launch" should provide { "Launch" should provide {
"ClassLoader for Scala 2.8.0" in { checkScalaLoader("2.8.0") } "ClassLoader for Scala 2.8.0" in { checkScalaLoader("2.8.0") }
"ClassLoader for Scala 2.8.1" in { checkScalaLoader("2.8.1") } "ClassLoader for Scala 2.8.2" in { checkScalaLoader("2.8.2") }
"ClassLoader for Scala 2.9.0-1" in { checkScalaLoader("2.9.0-1") } "ClassLoader for Scala 2.9.0" in { checkScalaLoader("2.9.0") }
"ClassLoader for Scala 2.9.1" in { checkScalaLoader("2.9.1") } "ClassLoader for Scala 2.9.2" in { checkScalaLoader("2.9.2") }
} }
"Launch" should { "Launch" should {
@ -36,7 +36,7 @@ object ScalaProviderTest extends Specification
withTemporaryDirectory { currentDirectory => withTemporaryDirectory { currentDirectory =>
withLauncher { launcher => withLauncher { launcher =>
Launch.run(launcher)( Launch.run(launcher)(
new RunConfiguration(Some(mapScalaVersion(LaunchTest.getScalaVersion)), LaunchTest.testApp(mainClassName, extra(currentDirectory)).toID, currentDirectory, arguments) new RunConfiguration(Some(unmapScalaVersion(LaunchTest.getScalaVersion)), LaunchTest.testApp(mainClassName, extra(currentDirectory)).toID, currentDirectory, arguments)
) )
} }
} }
@ -48,7 +48,7 @@ object ScalaProviderTest extends Specification
testResources.foreach(resource => touch(new File(resourceDirectory, resource.replace('/', File.separatorChar)))) testResources.foreach(resource => touch(new File(resourceDirectory, resource.replace('/', File.separatorChar))))
Array(resourceDirectory) Array(resourceDirectory)
} }
private def checkScalaLoader(version: String): Unit = withLauncher( checkLauncher(version, scalaVersionMap(version)) ) private def checkScalaLoader(version: String): Unit = withLauncher( checkLauncher(version, mapScalaVersion(version)) )
private def checkLauncher(version: String, versionValue: String)(launcher: Launcher): Unit = private def checkLauncher(version: String, versionValue: String)(launcher: Launcher): Unit =
{ {
val provider = launcher.getScala(version) val provider = launcher.getScala(version)
@ -70,9 +70,8 @@ object LaunchTest
f(Launcher(bootDirectory, testRepositories)) f(Launcher(bootDirectory, testRepositories))
} }
def mapScalaVersion(versionNumber: String) = scalaVersionMap.find(_._2 == versionNumber).getOrElse { def unmapScalaVersion(versionNumber: String) = versionNumber.stripSuffix(".final")
error("Scala version number " + versionNumber + " from library.properties has no mapping")}._1 def mapScalaVersion(versionNumber: String) = versionNumber + ".final"
val scalaVersionMap = Map("2.9.0-1" -> "2.9.0.1") ++ List("2.8.0", "2.8.1", "2.9.1").map(v => (v, v + ".final"))
def getScalaVersion: String = getScalaVersion(getClass.getClassLoader) def getScalaVersion: String = getScalaVersion(getClass.getClassLoader)
def getScalaVersion(loader: ClassLoader): String = loadProperties(loader, "library.properties").getProperty("version.number") def getScalaVersion(loader: ClassLoader): String = loadProperties(loader, "library.properties").getProperty("version.number")
lazy val AppVersion = loadProperties(getClass.getClassLoader, "xsbt.version.properties").getProperty("version") lazy val AppVersion = loadProperties(getClass.getClassLoader, "xsbt.version.properties").getProperty("version")

View File

@ -17,7 +17,7 @@ object Sbt extends Build
organization := "org.scala-sbt", organization := "org.scala-sbt",
version := "0.12.0-SNAPSHOT", version := "0.12.0-SNAPSHOT",
publishArtifact in packageDoc := false, publishArtifact in packageDoc := false,
scalaVersion := "2.9.1", scalaVersion := "2.9.2",
publishMavenStyle := false, publishMavenStyle := false,
componentID := None, componentID := None,
crossPaths := false, crossPaths := false,
@ -93,8 +93,7 @@ object Sbt extends Build
// Compiler-side interface to compiler that is compiled against the compiler being used either in advance or on the fly. // Compiler-side interface to compiler that is compiled against the compiler being used either in advance or on the fly.
// Includes API and Analyzer phases that extract source API and relationships. // Includes API and Analyzer phases that extract source API and relationships.
lazy val compileInterfaceSub = baseProject(compilePath / "interface", "Compiler Interface") dependsOn(interfaceSub, ioSub % "test->test", logSub % "test->test", launchSub % "test->test") settings( compileInterfaceSettings : _*) lazy val compileInterfaceSub = baseProject(compilePath / "interface", "Compiler Interface") dependsOn(interfaceSub, ioSub % "test->test", logSub % "test->test", launchSub % "test->test") settings( compileInterfaceSettings : _*)
lazy val precompiled290 = precompiled("2.9.0") lazy val precompiled282 = precompiled("2.8.2")
lazy val precompiled281 = precompiled("2.8.1")
lazy val precompiled2100 = precompiled("2.10.0-M2") lazy val precompiled2100 = precompiled("2.10.0-M2")
// Implements the core functionality of detecting and propagating changes incrementally. // Implements the core functionality of detecting and propagating changes incrementally.
@ -124,7 +123,7 @@ object Sbt extends Build
// Strictly for bringing implicits and aliases from subsystems into the top-level sbt namespace through a single package object // Strictly for bringing implicits and aliases from subsystems into the top-level sbt namespace through a single package object
// technically, we need a dependency on all of mainSub's dependencies, but we don't do that since this is strictly an integration project // technically, we need a dependency on all of mainSub's dependencies, but we don't do that since this is strictly an integration project
// with the sole purpose of providing certain identifiers without qualification (with a package object) // with the sole purpose of providing certain identifiers without qualification (with a package object)
lazy val sbtSub = baseProject(sbtPath, "Simple Build Tool") dependsOn(mainSub, compileInterfaceSub, precompiled281, precompiled2100, precompiled290, scriptedSbtSub % "test->test") settings(sbtSettings : _*) lazy val sbtSub = baseProject(sbtPath, "Simple Build Tool") dependsOn(mainSub, compileInterfaceSub, precompiled282, precompiled2100, scriptedSbtSub % "test->test") settings(sbtSettings : _*)
/* Nested subproject paths */ /* Nested subproject paths */
def sbtPath = file("sbt") def sbtPath = file("sbt")

View File

@ -28,8 +28,8 @@ object Util
lazy val base: Seq[Setting[_]] = Seq(scalacOptions ++= Seq("-Xelide-below", "0"), projectComponent) ++ Licensed.settings lazy val base: Seq[Setting[_]] = Seq(scalacOptions ++= Seq("-Xelide-below", "0"), projectComponent) ++ Licensed.settings
def testDependencies = libraryDependencies ++= Seq( def testDependencies = libraryDependencies ++= Seq(
"org.scala-tools.testing" %% "scalacheck" % "1.9" % "test", "org.scala-tools.testing" % "scalacheck_2.9.1" % "1.9" % "test",
"org.scala-tools.testing" %% "specs" % "1.6.9" % "test" "org.scala-tools.testing" % "specs_2.9.1" % "1.6.9" % "test"
) )
lazy val minimalSettings: Seq[Setting[_]] = Defaults.paths ++ Seq[Setting[_]](crossTarget <<= target.identity, name <<= thisProject(_.id)) lazy val minimalSettings: Seq[Setting[_]] = Defaults.paths ++ Seq[Setting[_]](crossTarget <<= target.identity, name <<= thisProject(_.id))

View File

@ -1,3 +1,3 @@
resolvers += Resolver.url("sbt-plugin-snapshots", url("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-snapshots/"))(Resolver.ivyStylePatterns) resolvers += Resolver.url("sbt-plugin-snapshots", url("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-snapshots/"))(Resolver.ivyStylePatterns)
addSbtPlugin("com.eed3si9n" % "sbt-twt" % "0.2.1-SNAPSHOT", sbtVersion="0.12.0-M2") addSbtPlugin("com.eed3si9n" % "sbt-twt" % "0.2.1-SNAPSHOT", sbtVersion="0.12.0-M2", scalaVersion="2.9.1")

View File

@ -1,4 +1,4 @@
libraryDependencies += "org.scalatest" %% "scalatest" % "1.6.1" % "test" libraryDependencies += "org.scalatest" % "scalatest_2.9.1" % "1.6.1" % "test"
testOptions in Configurations.Test ++= { testOptions in Configurations.Test ++= {

View File

@ -12,5 +12,5 @@ object B extends Build
resolvers += ScalaToolsReleases resolvers += ScalaToolsReleases
) )
lazy val specs = "org.specs2" %% "specs2" % "1.7.1" % "it,test" lazy val specs = "org.specs2" % "specs2_2.9.1" % "1.7.1" % "it,test"
} }

View File

@ -1,3 +1,3 @@
libraryDependencies += "org.specs2" %% "specs2" % "1.7.1" % "test" libraryDependencies += "org.specs2" % "specs2_2.9.1" % "1.7.1" % "test"
resolvers += ScalaToolsReleases resolvers += ScalaToolsReleases

View File

@ -1,3 +1,3 @@
libraryDependencies += "org.specs2" %% "specs2" % "1.7.1" % "test" libraryDependencies += "org.specs2" % "specs2_2.9.1" % "1.7.1" % "test"
resolvers += ScalaToolsReleases resolvers += ScalaToolsReleases