mirror of https://github.com/sbt/sbt.git
Merge pull request #2068 from sbt/wip/scalaversionbump
Bumping up Scala version to 2.10.5/2.11.6. Fixes #1666, Ref #1980
This commit is contained in:
commit
2cb9694b6d
|
|
@ -24,7 +24,7 @@ def buildLevelSettings: Seq[Setting[_]] = Seq(
|
|||
)
|
||||
|
||||
def commonSettings: Seq[Setting[_]] = Seq(
|
||||
scalaVersion := "2.10.4",
|
||||
scalaVersion := scala210,
|
||||
publishArtifact in packageDoc := false,
|
||||
publishMavenStyle := false,
|
||||
componentID := None,
|
||||
|
|
@ -387,7 +387,7 @@ lazy val scriptedBaseProj = (project in scriptedPath / "base").
|
|||
)
|
||||
|
||||
lazy val scriptedSbtProj = (project in scriptedPath / "sbt").
|
||||
dependsOn (ioProj, logProj, processProj, scriptedBaseProj).
|
||||
dependsOn (ioProj, logProj, processProj, scriptedBaseProj, interfaceProj).
|
||||
settings(
|
||||
baseSettings,
|
||||
name := "Scripted sbt",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ name := "play-html-compressor"
|
|||
|
||||
scalaVersion := "2.11.1"
|
||||
|
||||
val pom = <xml:group><scm>
|
||||
val pom = <scm>
|
||||
<url>git@github.com:mohiva/play-html-compressor.git</url>
|
||||
<connection>scm:git:git@github.com:mohiva/play-html-compressor.git</connection>
|
||||
</scm>
|
||||
|
|
@ -13,9 +13,6 @@ val pom = <xml:group><scm>
|
|||
<name>Christian Kaps</name>
|
||||
<url>http://mohiva.com</url>
|
||||
</developer>
|
||||
</developers></xml:group>
|
||||
</developers>
|
||||
|
||||
publishMavenStyle := true
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ parallelExecution in Test := false
|
|||
// publishing
|
||||
|
||||
pomExtra :=
|
||||
<xml:group>
|
||||
<url>http://nbronson.github.com/scala-stm/</url>
|
||||
<licenses>
|
||||
<license>
|
||||
|
|
@ -42,7 +41,6 @@ pomExtra :=
|
|||
<email>ngbronson@gmail.com</email>
|
||||
</developer>
|
||||
</developers>
|
||||
</xml:group>
|
||||
|
||||
publishMavenStyle := true
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import sbt._
|
|||
|
||||
val scmpom = taskKey[xml.NodeBuffer]("Node buffer")
|
||||
|
||||
scmpom := <xml:group><scm>
|
||||
scmpom := <scm>
|
||||
<url>git@github.com:mohiva/play-html-compressor.git</url>
|
||||
<connection>scm:git:git@github.com:mohiva/play-html-compressor.git</connection>
|
||||
</scm>
|
||||
|
|
@ -13,4 +13,4 @@ scmpom := <xml:group><scm>
|
|||
<url>http://mohiva.com</url>
|
||||
</developer>
|
||||
</developers>
|
||||
<a></a></xml:group>
|
||||
<a></a>
|
||||
|
|
@ -1 +1 @@
|
|||
scmpom := <xml:group><a/><b a="rt">OK</b></xml:group>
|
||||
scmpom := <a/><b a="rt">OK</b>
|
||||
|
|
@ -2,4 +2,4 @@ import sbt._
|
|||
|
||||
val scmpom = taskKey[xml.NodeBuffer]("Node buffer")
|
||||
|
||||
scmpom := <xml:group><a/><b a="rt">OK</b></xml:group>
|
||||
scmpom := <a/><b a="rt">OK</b>
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
[@PanAeon]: https://github.com/PanAeon
|
||||
[@asflierl]: http://github.com/asflierl
|
||||
[@matthewfarwell]: http://github.com/matthewfarwell
|
||||
|
||||
[SI9027]: https://issues.scala-lang.org/browse/SI-9027
|
||||
[1950]: https://github.com/sbt/sbt/pull/1950
|
||||
[1987]: https://github.com/sbt/sbt/pull/1987
|
||||
[1970]: https://github.com/sbt/sbt/pull/1970
|
||||
|
|
@ -40,11 +40,14 @@
|
|||
[2035]: https://github.com/sbt/sbt/pull/2035
|
||||
[2001]: https://github.com/sbt/sbt/issues/2001
|
||||
[2027]: https://github.com/sbt/sbt/pull/2027
|
||||
[1666]: https://github.com/sbt/sbt/issues/1666
|
||||
[2068]: https://github.com/sbt/sbt/pull/2068
|
||||
|
||||
### Fixes with compatibility implications
|
||||
|
||||
- Starting 0.13.9, `crossScalaVersions` default value is fixed back to the older 0.12.x behavior. See below for details.
|
||||
- Starting 0.13.9, the generated POM files no longer include dependencies on source or javadoc jars obtained via `withSources()` or `withJavadoc()`. See below for details.
|
||||
- Scala version is bumped to 2.10.5. This brings in the fix for [SI-9027][SI9027]: XML node sequence literal bug. [#1666][1666]/[#2068][2068] by [@eed3si9n][@eed3si9n]
|
||||
|
||||
### Improvements
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ object Dependencies {
|
|||
lazy val scala282 = "2.8.2"
|
||||
lazy val scala292 = "2.9.2"
|
||||
lazy val scala293 = "2.9.3"
|
||||
lazy val scala210 = "2.10.4"
|
||||
lazy val scala211 = "2.11.1"
|
||||
lazy val scala210 = "2.10.5"
|
||||
lazy val scala211 = "2.11.6"
|
||||
|
||||
lazy val jline = "jline" % "jline" % "2.11"
|
||||
lazy val ivy = "org.scala-sbt.ivy" % "ivy" % "2.3.0-sbt-fccfbd44c9f64523b61398a0155784dcbaeae28f"
|
||||
|
|
|
|||
|
|
@ -57,15 +57,30 @@ object Scripted {
|
|||
(token(Space) ~> (PagedIds | testIdAsGroup)).* map (_.flatten)
|
||||
}
|
||||
|
||||
// Interface to cross class loader
|
||||
type SbtScriptedRunner = {
|
||||
def run(resourceBaseDirectory: File, bufferLog: Boolean, tests: Array[String], bootProperties: File,
|
||||
launchOpts: Array[String], prescripted: java.util.List[File]): Unit
|
||||
}
|
||||
|
||||
def doScripted(launcher: File, scriptedSbtClasspath: Seq[Attributed[File]], scriptedSbtInstance: ScalaInstance, sourcePath: File, args: Seq[String], prescripted: File => Unit) {
|
||||
System.err.println(s"About to run tests: ${args.mkString("\n * ", "\n * ", "\n")}")
|
||||
val noJLine = new classpath.FilteredLoader(scriptedSbtInstance.loader, "jline." :: Nil)
|
||||
val loader = classpath.ClasspathUtilities.toLoader(scriptedSbtClasspath.files, noJLine)
|
||||
val m = ModuleUtilities.getObject("sbt.test.ScriptedTests", loader)
|
||||
val r = m.getClass.getMethod("run", classOf[File], classOf[Boolean], classOf[Array[String]], classOf[File], classOf[Array[String]], classOf[File => Unit])
|
||||
val bridgeClass = Class.forName("sbt.test.ScriptedRunner", true, loader)
|
||||
val bridge = bridgeClass.newInstance.asInstanceOf[SbtScriptedRunner]
|
||||
val launcherVmOptions = Array("-XX:MaxPermSize=256M") // increased after a failure in scripted source-dependencies/macro
|
||||
try { r.invoke(m, sourcePath, true: java.lang.Boolean, args.toArray[String], launcher, launcherVmOptions, prescripted) }
|
||||
catch { case ite: java.lang.reflect.InvocationTargetException => throw ite.getCause }
|
||||
try {
|
||||
// Using java.util.List to encode File => Unit.
|
||||
val callback = new java.util.AbstractList[File] {
|
||||
override def add(x: File): Boolean = {
|
||||
prescripted(x)
|
||||
false
|
||||
}
|
||||
def get(x: Int): sbt.File = ???
|
||||
def size(): Int = 0
|
||||
}
|
||||
bridge.run(sourcePath, true, args.toArray, launcher, launcherVmOptions, callback)
|
||||
} catch { case ite: java.lang.reflect.InvocationTargetException => throw ite.getCause }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
scalaVersion := "2.10.5"
|
||||
|
||||
libraryDependencies ++= Seq(
|
||||
"net.databinder" %% "dispatch-http" % "0.8.9",
|
||||
"org.jsoup" % "jsoup" % "1.7.1"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import xsbt.test.{ CommentHandler, FileCommands, ScriptRunner, TestScriptParser
|
|||
import IO.wrapNull
|
||||
|
||||
final class ScriptedTests(resourceBaseDirectory: File, bufferLog: Boolean, launcher: File, launchOpts: Seq[String]) {
|
||||
import ScriptedTests.emptyCallback
|
||||
import ScriptedTests._
|
||||
private val testResources = new Resources(resourceBaseDirectory)
|
||||
|
||||
val ScriptFilename = "test"
|
||||
|
|
@ -46,6 +46,7 @@ final class ScriptedTests(resourceBaseDirectory: File, bufferLog: Boolean, launc
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private def scriptedTest(label: String, testDirectory: File, prescripted: File => Unit, log: Logger): Unit =
|
||||
{
|
||||
val buffered = new BufferedLogger(new FullLogger(log))
|
||||
|
|
@ -94,9 +95,9 @@ final class ScriptedTests(resourceBaseDirectory: File, bufferLog: Boolean, launc
|
|||
} finally { buffered.clear() }
|
||||
}
|
||||
}
|
||||
object ScriptedTests {
|
||||
val emptyCallback: File => Unit = { _ => () }
|
||||
|
||||
object ScriptedTests extends ScriptedRunner {
|
||||
val emptyCallback: File => Unit = { _ => () }
|
||||
def main(args: Array[String]) {
|
||||
val directory = new File(args(0))
|
||||
val buffer = args(1).toBoolean
|
||||
|
|
@ -108,14 +109,29 @@ object ScriptedTests {
|
|||
val logger = ConsoleLogger()
|
||||
run(directory, buffer, tests, logger, bootProperties, Array(), emptyCallback)
|
||||
}
|
||||
}
|
||||
|
||||
class ScriptedRunner {
|
||||
import ScriptedTests._
|
||||
|
||||
@deprecated("No longer used", "0.13.9")
|
||||
def run(resourceBaseDirectory: File, bufferLog: Boolean, tests: Array[String], bootProperties: File,
|
||||
launchOpts: Array[String]): Unit =
|
||||
run(resourceBaseDirectory, bufferLog, tests, ConsoleLogger(), bootProperties, launchOpts, emptyCallback) //new FullLogger(Logger.xlog2Log(log)))
|
||||
|
||||
// This is called by project/Scripted.scala
|
||||
// Using java.util.List[File] to encode File => Unit
|
||||
def run(resourceBaseDirectory: File, bufferLog: Boolean, tests: Array[String], bootProperties: File,
|
||||
launchOpts: Array[String], prescripted: java.util.List[File]): Unit =
|
||||
run(resourceBaseDirectory, bufferLog, tests, ConsoleLogger(), bootProperties, launchOpts,
|
||||
{ f: File => prescripted.add(f); () }) //new FullLogger(Logger.xlog2Log(log)))
|
||||
|
||||
@deprecated("No longer used", "0.13.9")
|
||||
def run(resourceBaseDirectory: File, bufferLog: Boolean, tests: Array[String], bootProperties: File,
|
||||
launchOpts: Array[String], prescripted: File => Unit): Unit =
|
||||
run(resourceBaseDirectory, bufferLog, tests, ConsoleLogger(), bootProperties, launchOpts, prescripted) //new FullLogger(Logger.xlog2Log(log)))
|
||||
run(resourceBaseDirectory, bufferLog, tests, ConsoleLogger(), bootProperties, launchOpts, prescripted)
|
||||
|
||||
@deprecated("No longer used", "0.13.9")
|
||||
def run(resourceBaseDirectory: File, bufferLog: Boolean, tests: Array[String], logger: AbstractLogger, bootProperties: File,
|
||||
launchOpts: Array[String]): Unit =
|
||||
run(resourceBaseDirectory, bufferLog, tests, logger, bootProperties, launchOpts, emptyCallback)
|
||||
|
|
|
|||
Loading…
Reference in New Issue