Permalink
Browse files

task setting macros for :=, +=, ++=

also, bump to 2.10.0-M6
  • Loading branch information...
1 parent c90fb3f commit fa0c303f679c15e346fdfcb4a1dc23e0430e1195 @harrah committed Jul 31, 2012
@@ -7,6 +7,7 @@ import xsbti.api
import xsbti.SafeLazy
import SafeLazy.strict
import collection.mutable
+import scala.reflect.ClassTag
object ClassToAPI
{
@@ -18,7 +19,7 @@ object ClassToAPI
}
// Avoiding implicit allocation.
- private def arrayMap[T <: AnyRef, U <: AnyRef : ClassManifest](xs: Array[T])(f: T => U): Array[U] = {
+ private def arrayMap[T <: AnyRef, U <: AnyRef : ClassTag](xs: Array[T])(f: T => U): Array[U] = {
val len = xs.length
var i = 0
val res = new Array[U](len)
@@ -63,10 +63,10 @@ final object Aggregation
def printSuccess(start: Long, stop: Long, extracted: Extracted, success: Boolean, log: Logger)
{
import extracted._
- lazy val enabled = showSuccess in extracted.currentRef get extracted.structure.data getOrElse true
+ lazy val enabled = showSuccess in extracted.currentRef getValue extracted.structure.data getOrElse true
if(enabled)
{
- val timingEnabled = showTiming in currentRef get structure.data getOrElse true
+ val timingEnabled = showTiming in currentRef getValue structure.data getOrElse true
if(timingEnabled)
{
val msg = timingString(start, stop, "", structure.data, currentRef, log)
@@ -78,7 +78,7 @@ final object Aggregation
}
private def timingString(startTime: Long, endTime: Long, s: String, data: Settings[Scope], currentRef: ProjectRef, log: Logger): String =
{
- val format = timingFormat in currentRef get data getOrElse defaultFormat
+ val format = timingFormat in currentRef getValue data getOrElse defaultFormat
timing(format, startTime, endTime, "", log)
}
def timing(format: java.text.DateFormat, startTime: Long, endTime: Long, s: String, log: Logger): String =
@@ -154,7 +154,7 @@ final object Aggregation
}
def aggregationEnabled(key: ScopedKey[_], data: Settings[Scope]): Boolean =
- Keys.aggregate in Scope.fillTaskAxis(key.scope, key.key) get data getOrElse true
+ Keys.aggregate in Scope.fillTaskAxis(key.scope, key.key) getValue data getOrElse true
@deprecated("Use BuildUtil.aggregationRelation", "0.13.0")
def relation(units: Map[URI, LoadedBuildUnit]): Relation[ProjectRef, ProjectRef] =
@@ -115,5 +115,5 @@ object BuildStreams
def refTarget(ref: ResolvedReference, fallbackBase: File, data: Settings[Scope]): File =
refTarget(GlobalScope.copy(project = Select(ref)), fallbackBase, data)
def refTarget(scope: Scope, fallbackBase: File, data: Settings[Scope]): File =
- (Keys.target in scope get data getOrElse outputDirectory(fallbackBase).asFile ) / StreamsDirectory
+ (Keys.target in scope getValue data getOrElse outputDirectory(fallbackBase).asFile ) / StreamsDirectory
}
View
@@ -45,14 +45,14 @@ object Cross
val x = Project.extract(state)
import x._
val versions = crossVersions(state)
- val current = scalaVersion in currentRef get structure.data map(Switch + " " + _) toList;
+ val current = scalaVersion in currentRef getValue structure.data map(Switch + " " + _) toList;
if(versions.isEmpty) command :: state else versions.map(Switch + " " + _ + " " + command) ::: current ::: state
}
def crossVersions(state: State): Seq[String] =
{
val x = Project.extract(state)
import x._
- crossScalaVersions in currentRef get structure.data getOrElse Nil
+ crossScalaVersions in currentRef getValue structure.data getOrElse Nil
}
def requireSession[T](p: State => Parser[T]): State => Parser[T] = s =>
Oops, something went wrong.

0 comments on commit fa0c303

Please sign in to comment.