diff --git a/compile/src/test/scala/CompileTest.scala b/compile/src/test/scala/CompileTest.scala index a27dd7d6a..38763e7a2 100644 --- a/compile/src/test/scala/CompileTest.scala +++ b/compile/src/test/scala/CompileTest.scala @@ -58,7 +58,7 @@ object CompileTest extends Specification private def testClasspath(scalaVersion: String) = WithCompiler.launcher { (launch, log) => def compiler(bootLibrary: Boolean, compilerOnClasspath: Boolean): RawCompiler = - new RawCompiler(ScalaInstance(scalaVersion, launch), new ClasspathOptions(bootLibrary, compilerOnClasspath, true, true, true), log) + new RawCompiler(ScalaInstance(scalaVersion, launch), new ClasspathOptions(bootLibrary, compilerOnClasspath, true, true, bootLibrary), log) val callback = new xsbti.TestCallback @@ -75,17 +75,17 @@ object CompileTest extends Specification val plainSrcs = Seq[File](plain) val compSrcs = Seq[File](useCompiler) withTemporaryDirectory { out => - shouldSucceed( standard(plainSrcs, Nil, out, Nil) )//success - shouldSucceed( standard(compSrcs, Nil, out, Nil) )//success + shouldSucceed( standard(plainSrcs, Nil, out, Nil) ) + shouldSucceed( standard(compSrcs, Nil, out, Nil) ) - shouldSucceed( noCompiler(plainSrcs, Nil, out, Nil) )//success + shouldSucceed( noCompiler(plainSrcs, Nil, out, Nil) ) shouldFail( noCompiler(compSrcs, Nil, out, Nil) ) - shouldSucceed( noCompiler(compSrcs, withCompiler, out, Nil) )//success + shouldSucceed( noCompiler(compSrcs, withCompiler, out, Nil) ) - shouldFail( fullExplicit(plainSrcs, Nil, out, Nil) )// failure - shouldFail( fullExplicit(compSrcs, Nil, out, Nil) )// failure - shouldSucceed( fullExplicit(plainSrcs, withLibrary, out, fullBoot) )// success - shouldSucceed( fullExplicit(compSrcs, withLibraryCompiler, out, fullBoot) )// success + shouldFail( fullExplicit(plainSrcs, Nil, out, Nil) ) + shouldFail( fullExplicit(compSrcs, Nil, out, Nil) ) + shouldSucceed( fullExplicit(plainSrcs, withLibrary, out, fullBoot) ) + shouldSucceed( fullExplicit(compSrcs, withLibraryCompiler, out, fullBoot) ) true must beTrue } } diff --git a/compile/src/test/scala/TestCompile.scala b/compile/src/test/scala/TestCompile.scala index 1dd3f7f0f..63519b0ab 100644 --- a/compile/src/test/scala/TestCompile.scala +++ b/compile/src/test/scala/TestCompile.scala @@ -8,7 +8,7 @@ package compiler object TestCompile { - def allVersions = List("2.7.4", "2.8.1", "2.9.0.RC1")//List("2.7.4", "2.7.7", "2.8.0", "2.8.1", "2.9.0.RC1") + def allVersions = List("2.8.1", "2.9.0-1") /** Tests running the compiler interface with the analyzer plugin with a test callback. The test callback saves all information * that the plugin sends it for post-compile analysis by the provided function.*/ def apply[T](scalaVersion: String, sources: Seq[File], outputDirectory: File, options: Seq[String]) diff --git a/launch/src/test/scala/ScalaProviderTest.scala b/launch/src/test/scala/ScalaProviderTest.scala index 06104b29d..2263a432f 100644 --- a/launch/src/test/scala/ScalaProviderTest.scala +++ b/launch/src/test/scala/ScalaProviderTest.scala @@ -13,10 +13,10 @@ object ScalaProviderTest extends Specification "Launch" should provide { "ClassLoader for Scala 2.7.4" in { checkScalaLoader("2.7.4") } "ClassLoader for Scala 2.7.5" in { checkScalaLoader("2.7.5") } - "ClassLoader for Scala 2.7.6" in { checkScalaLoader("2.7.6") } "ClassLoader for Scala 2.7.7" in { checkScalaLoader("2.7.7") } "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.9.0-1" in { checkScalaLoader("2.9.0-1") } } "Launch" should { @@ -74,7 +74,7 @@ object LaunchTest def mapScalaVersion(versionNumber: String) = scalaVersionMap.find(_._2 == versionNumber).getOrElse { error("Scala version number " + versionNumber + " from library.properties has no mapping")}._1 - val scalaVersionMap = List("2.8.0", "2.8.1", "2.9.0.RC1").map(x => (x,x)).toMap ++ List("2.7.4", "2.7.5", "2.7.6", "2.7.7").map(v => (v, v + ".final")) + val scalaVersionMap = Map("2.9.0-1" -> "2.9.0.1") ++ List("2.7.4", "2.7.5", "2.7.6", "2.7.7", "2.8.0", "2.8.1").map(v => (v, v + ".final")) def getScalaVersion: String = getScalaVersion(getClass.getClassLoader) def getScalaVersion(loader: ClassLoader): String = loadProperties(loader, "library.properties").getProperty("version.number") lazy val AppVersion = loadProperties(getClass.getClassLoader, "xsbt.version.properties").getProperty("version") diff --git a/sbt/src/sbt-test/dependency-management/info/project/InfoTest.scala b/sbt/src/sbt-test/dependency-management/info/project/InfoTest.scala index 031309bac..e491e3ea0 100644 --- a/sbt/src/sbt-test/dependency-management/info/project/InfoTest.scala +++ b/sbt/src/sbt-test/dependency-management/info/project/InfoTest.scala @@ -6,7 +6,7 @@ object InfoTest extends Build { lazy val root = Project("root", file(".")) settings( ivyPaths <<= (baseDirectory, target)( (dir, t) => new IvyPaths(dir, Some(t / "ivy-cache"))), - ivyXML <<= (customInfo, organization, moduleID, version) apply inlineXML, + ivyXML <<= (customInfo, organization, moduleName, version) apply inlineXML, projectID ~= (_ cross false), customInfo <<= baseDirectory{_ / "info" exists }, TaskKey[Unit]("check-download") <<= checkDownload, diff --git a/sbt/src/sbt-test/dependency-management/module-confs/Test.sbt b/sbt/src/sbt-test/dependency-management/module-confs/Test.sbt index e77aa7def..924a15bc3 100644 --- a/sbt/src/sbt-test/dependency-management/module-confs/Test.sbt +++ b/sbt/src/sbt-test/dependency-management/module-confs/Test.sbt @@ -1,7 +1,7 @@ { - def snapshotPattern = "http://scala-tools.org/repo-snapshots/[organization]/[module]/2.10.0-SNAPSHOT/[artifact]-[revision].[ext]" + def snapshotPattern = "http://repo.typesafe.com/typesafe/scala-tools-snapshots/[organization]/[module]/2.10.0-SNAPSHOT/[artifact]-[revision].[ext]" def scalaSnapshots = Resolver.url("Scala Tools Snapshots") artifacts(snapshotPattern) ivys(snapshotPattern) mavenStyle() moduleConfigurations += ModuleConfiguration("org.scala-lang", "*", "2.10.0-.*", scalaSnapshots) } -libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.10.0-20110412.015459-16" \ No newline at end of file +libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.10.0-20110531.020043-60" \ No newline at end of file diff --git a/sbt/src/sbt-test/dependency-management/module-confs/changes/WrongOrg.sbt b/sbt/src/sbt-test/dependency-management/module-confs/changes/WrongOrg.sbt index 2ab1e7378..4892f2792 100644 --- a/sbt/src/sbt-test/dependency-management/module-confs/changes/WrongOrg.sbt +++ b/sbt/src/sbt-test/dependency-management/module-confs/changes/WrongOrg.sbt @@ -1,7 +1,7 @@ { - def snapshotPattern = "http://scala-tools.org/repo-snapshots/[organization]/[module]/2.10.0-SNAPSHOT/[artifact]-[revision].[ext]" + def snapshotPattern = "http://repo.typesafe.com/typesafe/scala-tools-snapshots/[organization]/[module]/2.10.0-SNAPSHOT/[artifact]-[revision].[ext]" def scalaSnapshots = Resolver.url("Scala Tools Snapshots") artifacts(snapshotPattern) ivys(snapshotPattern) mavenStyle() moduleConfigurations += ModuleConfiguration("org.not-scala-lang", "*", "2.10.0-.*", scalaSnapshots) } -libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.10.0-20110412.015459-16" \ No newline at end of file +libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.10.0-20110531.020043-60" \ No newline at end of file diff --git a/sbt/src/sbt-test/dependency-management/module-confs/changes/WrongPattern.sbt b/sbt/src/sbt-test/dependency-management/module-confs/changes/WrongPattern.sbt index 4f0d3a80c..df51947b7 100644 --- a/sbt/src/sbt-test/dependency-management/module-confs/changes/WrongPattern.sbt +++ b/sbt/src/sbt-test/dependency-management/module-confs/changes/WrongPattern.sbt @@ -1,7 +1,7 @@ { - def snapshotPattern = "http://scala-tools.org/repo-snapshots/[organization]/[module]/2.10.a-SNAPSHOT/[artifact]-[revision].[ext]" + def snapshotPattern = "http://repo.typesafe.com/typesafe/scala-tools-snapshots/[organization]/[module]/2.10.a-SNAPSHOT/[artifact]-[revision].[ext]" def scalaSnapshots = Resolver.url("Scala Tools Snapshots") artifacts(snapshotPattern) ivys(snapshotPattern) mavenStyle() moduleConfigurations += ModuleConfiguration("org.scala-lang", "*", "2.10.0-.*", scalaSnapshots) } -libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.10.0-20110412.015459-16" \ No newline at end of file +libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.10.0-20110531.020043-60" diff --git a/sbt/src/sbt-test/dependency-management/module-confs/changes/WrongVersion.sbt b/sbt/src/sbt-test/dependency-management/module-confs/changes/WrongVersion.sbt index ec469ff73..2f6c10b07 100644 --- a/sbt/src/sbt-test/dependency-management/module-confs/changes/WrongVersion.sbt +++ b/sbt/src/sbt-test/dependency-management/module-confs/changes/WrongVersion.sbt @@ -1,7 +1,7 @@ { - def snapshotPattern = "http://scala-tools.org/repo-snapshots/[organization]/[module]/2.10.0-SNAPSHOT/[artifact]-[revision].[ext]" + def snapshotPattern = "http://repo.typesafe.com/typesafe/scala-tools-snapshots/[organization]/[module]/2.10.0-SNAPSHOT/[artifact]-[revision].[ext]" def scalaSnapshots = Resolver.url("Scala Tools Snapshots") artifacts(snapshotPattern) ivys(snapshotPattern) mavenStyle() moduleConfigurations += ModuleConfiguration("org.scala-lang", "*", "2.10.0-.*", scalaSnapshots) } -libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.10.0-20110412.015459-17" \ No newline at end of file +libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.10.0-20110531.020043-61" \ No newline at end of file diff --git a/sbt/src/sbt-test/dependency-management/module-confs/common.sbt b/sbt/src/sbt-test/dependency-management/module-confs/common.sbt index 3c07f7779..a22544b6e 100644 --- a/sbt/src/sbt-test/dependency-management/module-confs/common.sbt +++ b/sbt/src/sbt-test/dependency-management/module-confs/common.sbt @@ -1,5 +1,9 @@ -ivyScala ~= { (is: Option[IvyScala]) => is.map(_.copy(checkExplicit = false, overrideScalaVersion = false)) } +ivyScala ~= { (is: Option[IvyScala]) => is.map(_.copy(checkExplicit = false, overrideScalaVersion = false, filterImplicit = false)) } ivyPaths <<= baseDirectory( dir => new IvyPaths(dir, Some(dir / "ivy-home"))) -libraryDependencies += "junit" % "junit" % "4.8" \ No newline at end of file +libraryDependencies += "junit" % "junit" % "4.8" + +autoScalaLibrary := false + +cleanFiles <+= baseDirectory(_ / "ivy-home") \ No newline at end of file diff --git a/sbt/src/sbt-test/dependency-management/publish-local/changes/RetrieveTest.scala b/sbt/src/sbt-test/dependency-management/publish-local/changes/RetrieveTest.scala index 5185f8b3f..ef00824ef 100644 --- a/sbt/src/sbt-test/dependency-management/publish-local/changes/RetrieveTest.scala +++ b/sbt/src/sbt-test/dependency-management/publish-local/changes/RetrieveTest.scala @@ -7,14 +7,17 @@ object MultiPublishTest extends Build organization := "A", version := "1.0", ivyPaths <<= baseDirectory( dir => new IvyPaths(dir, Some(dir / "ivy" / "cache")) ), - externalResolvers <<= baseDirectory { base => Resolver.file("local", base / "ivy" / "local" asFile)(Resolver.ivyStylePatterns) :: Nil } - } + externalResolvers <<= baseDirectory map { base => Resolver.file("local", base / "ivy" / "local" asFile)(Resolver.ivyStylePatterns) :: Nil } + ) lazy val root = Project("root", file(".")) settings( name := "Retrieve Test", - libraryDependencies := if("mavenStyle".asFile.exists) mavenStyleDependencies else ivyStyleDependencies + mavenStyle, + libraryDependencies <<= publishMavenStyle { style => if(style) mavenStyleDependencies else ivyStyleDependencies } ) + lazy val mavenStyle = publishMavenStyle <<= baseDirectory { base => (base / "mavenStyle") exists } + def ivyStyleDependencies = parentDep("A") :: subDep("A") :: subDep("B") ::parentDep("D") :: Nil def mavenStyleDependencies = parentDep("B") :: parentDep("C") :: subDep("C") :: subDep("D") :: Nil diff --git a/sbt/src/sbt-test/dependency-management/publish-local/project/MultiPublishTest.scala b/sbt/src/sbt-test/dependency-management/publish-local/project/MultiPublishTest.scala index bb5b49bf1..d67beeb38 100644 --- a/sbt/src/sbt-test/dependency-management/publish-local/project/MultiPublishTest.scala +++ b/sbt/src/sbt-test/dependency-management/publish-local/project/MultiPublishTest.scala @@ -7,14 +7,15 @@ object MultiPublishTest extends Build organization := "A", version := "1.0", ivyPaths <<= baseDirectory( dir => new IvyPaths(dir, Some(dir / "ivy" / "cache")) ), - externalResolvers <<= baseDirectory { base => Resolver.file("local", base / "ivy" / "local" asFile)(Resolver.ivyStylePatterns) :: Nil } + externalResolvers <<= baseDirectory map { base => Resolver.file("local", base / "ivy" / "local" asFile)(Resolver.ivyStylePatterns) :: Nil } ) - lazy val root = Project("root", file(".")) settings( mavenStyle, name = "Publish Test" ) + lazy val root = Project("root", file(".")) dependsOn(sub) aggregate(sub) settings( mavenStyle, interProject, name := "Publish Test" ) - lazy val sub = Project("sub", file("sub")) settings( mavenStyle, name = "Sub Project" ) + lazy val sub = Project("sub", file("sub")) settings( mavenStyle, name := "Sub Project" ) lazy val mavenStyle = publishMavenStyle <<= baseDirectory { base => (base / "mavenStyle") exists } - override def deliverProjectDependencies = if(managedStyle == sub.managedStyle) super.deliverProjectDependencies else Nil + def interProject = + projectDependencies <<= (publishMavenStyle, publishMavenStyle in sub, projectDependencies) map { (style, subStyle, pd) => if(style == subStyle) pd else Nil } } \ No newline at end of file diff --git a/sbt/src/sbt-test/dependency-management/publish-local/test b/sbt/src/sbt-test/dependency-management/publish-local/test index f08ff8f0a..5d7bb12f7 100644 --- a/sbt/src/sbt-test/dependency-management/publish-local/test +++ b/sbt/src/sbt-test/dependency-management/publish-local/test @@ -1,15 +1,15 @@ > publish-local $ touch mavenStyle -> set organization in ThisBuild := "B" +> set organization in ThisBuild :="B" > publish-local $ touch sub/mavenStyle -> set organization in ThisBuild := "C" +> set organization in ThisBuild :="C" > publish-local $ delete mavenStyle -> set organization := "D" +> set organization in ThisBuild :="D" > publish-local > set name := "Retrieve Test" diff --git a/sbt/src/sbt-test/dependency-management/url/project/TestProject.scala b/sbt/src/sbt-test/dependency-management/url/project/TestProject.scala index 471b22b88..126bfdc40 100644 --- a/sbt/src/sbt-test/dependency-management/url/project/TestProject.scala +++ b/sbt/src/sbt-test/dependency-management/url/project/TestProject.scala @@ -1,5 +1,6 @@ import sbt._ import Keys._ + import classpath.ClasspathUtilities object TestProject extends Build { @@ -9,19 +10,17 @@ object TestProject extends Build TaskKey[Unit]("check-in-compile") <<= checkClasspath(Compile) ) - lazy val checkInTest = checkClasspath(testClasspath) - lazy val checkInCompile = checkClasspath(compileClasspath) private def checkClasspath(conf: Configuration) = fullClasspath in conf map { cp => try { - val loader = ClasspathUtilities.toLoader(cp) + val loader = ClasspathUtilities.toLoader(cp.files) Class.forName("slinky.http.Application", false, loader) () } catch { - case _: ClassNotFoundException => error("Dependency not downloaded.") + case _: ClassNotFoundException => error("Dependency not downloaded.") } } } \ No newline at end of file diff --git a/sbt/src/sbt-test/dependency-management/url/test b/sbt/src/sbt-test/dependency-management/url/test index 7ceb7a895..e5dae2249 100644 --- a/sbt/src/sbt-test/dependency-management/url/test +++ b/sbt/src/sbt-test/dependency-management/url/test @@ -1,7 +1,2 @@ --> check-in-test --> check-in-compile - -> update - > check-in-test -> check-in-compile