Adding -feature and trying to find scala versions for our akka-actor-test dependencies. Also updating the version of Scalatest, specs2 and junit

This commit is contained in:
Viktor Klang 2012-06-15 13:04:10 +02:00
parent 9444df1245
commit cd0c89d939
24 changed files with 70 additions and 44 deletions

View file

@ -1,3 +1,7 @@
/**
* Copyright (C) 2009-2012 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.actor;
import akka.actor.ActorSystem;

View file

@ -1,7 +1,7 @@
/**
* Copyright (C) 2009-2012 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.util
/*package akka.util
import org.scalatest.matchers.MustMatchers
import akka.testkit.AkkaSpec
@ -59,4 +59,4 @@ class NonFatalSpec extends AkkaSpec with MustMatchers {
}
}
}*/

View file

@ -4,6 +4,8 @@
package akka.actor
import language.existentials
import akka.dispatch._
import scala.annotation.tailrec
import java.util.concurrent.TimeUnit

View file

@ -2,6 +2,9 @@
* Copyright (C) 2009-2012 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.actor
import language.implicitConversions
import java.util.regex.Pattern
import akka.util.Helpers

View file

@ -3,6 +3,8 @@
*/
package akka.actor
import language.implicitConversions
import akka.util._
import scala.collection.mutable

View file

@ -3,6 +3,8 @@
*/
package akka.actor
import language.implicitConversions
import java.util.concurrent.TimeUnit
import scala.collection.mutable.ArrayBuffer
import scala.collection.JavaConversions._

View file

@ -3,6 +3,9 @@
*/
package akka.actor
import language.higherKinds
import language.postfixOps
import akka.dispatch.{ Future, ExecutionContext }
import akka.util.{ ByteString, Duration, NonFatal }
import java.net.{ SocketAddress, InetSocketAddress }

View file

@ -4,6 +4,8 @@
package akka.actor
import language.existentials
import akka.dispatch._
import akka.japi.Creator
import scala.reflect.ClassTag

View file

@ -1,8 +1,9 @@
package akka.actor
/**
* Copyright (C) 2009-2012 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.actor
import language.existentials
import akka.japi.{ Creator, Option JOption }
import java.lang.reflect.{ InvocationTargetException, Method, InvocationHandler, Proxy }

View file

@ -4,6 +4,8 @@
package akka
import language.implicitConversions
package object actor {
implicit def actorRef2Scala(ref: ActorRef): ScalaActorRef = ref.asInstanceOf[ScalaActorRef]
implicit def scala2ActorRef(ref: ScalaActorRef): ActorRef = ref.asInstanceOf[ActorRef]

View file

@ -4,6 +4,10 @@
package akka.dispatch
import language.implicitConversions
import language.postfixOps
import language.higherKinds
import akka.event.Logging.Error
import scala.Option
import akka.japi.{ Function JFunc, Option JOption }

View file

@ -3,6 +3,8 @@
*/
package akka.event
import language.implicitConversions
import akka.actor.{ ActorRef, ActorSystem }
import akka.event.Logging.simpleName
import akka.util.Subclassification

View file

@ -3,6 +3,8 @@
*/
package akka.event
import language.existentials
import akka.actor._
import akka.{ ConfigurationException, AkkaException }
import akka.actor.ActorSystem.Settings
@ -722,7 +724,7 @@ object Logging {
* logger.
*/
class DefaultLogger extends Actor with StdOutLogger {
def receive = {
override def receive: Receive = {
case InitializeLogger(_) sender ! LoggerInitialized
case event: LogEvent print(event)
}

View file

@ -3,6 +3,8 @@
*/
package akka.event
import language.existentials
import akka.actor.Actor.Receive
import akka.actor.ActorContext
import akka.actor.ActorCell

View file

@ -4,6 +4,8 @@
package akka.japi
import language.implicitConversions
import scala.Some
import scala.reflect.ClassTag

View file

@ -3,6 +3,8 @@
*/
package akka.pattern
import language.implicitConversions
import java.util.concurrent.TimeoutException
import annotation.tailrec
import akka.actor._

View file

@ -3,6 +3,8 @@
*/
package akka.pattern
import language.implicitConversions
import akka.dispatch.Future
import akka.actor.{ Status, ActorRef }

View file

@ -3,6 +3,9 @@
*/
package akka.routing
import language.implicitConversions
import language.postfixOps
import akka.actor._
import akka.util.Duration
import akka.util.duration._

View file

@ -4,6 +4,8 @@
package akka.util
import language.implicitConversions
import java.util.concurrent.TimeUnit
import TimeUnit._
import java.lang.{ Double JDouble }

View file

@ -4,6 +4,8 @@
package akka.util
import language.implicitConversions
import java.util.concurrent.TimeUnit
//FIXME Needs docs
package object duration {

View file

@ -74,7 +74,7 @@ private[testkit] class CallingThreadDispatcherQueues extends Extension {
if (queues contains mbox) {
for {
ref queues(mbox)
val q = ref.get
q = ref.get
if (q ne null) && (q ne own)
} {
val owner = mbox.actor.self

View file

@ -362,7 +362,7 @@ object AkkaBuild extends Build {
resolvers += "Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/",
// compile options
scalacOptions ++= Seq("-encoding", "UTF-8", "-target:jvm-1.6", "-deprecation", "-unchecked", "-Xlog-reflective-calls") ++ (
scalacOptions ++= Seq("-encoding", "UTF-8", "-target:jvm-1.6", /*"-deprecation",*/ "-feature", "-unchecked", "-Xlog-reflective-calls") ++ (
if (true || (System getProperty "java.runtime.version" startsWith "1.7")) Seq() else Seq("-optimize")), // -optimize fails with jdk7
javacOptions ++= Seq("-Xlint:unchecked", "-Xlint:deprecation"),
@ -447,14 +447,9 @@ object Dependencies {
val testkit = Seq(Test.scalatest, Test.junit)
val actorTests = Seq(
Test.junit, Test.scalatest, Test.commonsMath, Test.mockito,
Test.scalacheck, protobuf
)
val actorTests = Seq(Test.junit, Test.scalatest, Test.commonsMath, Test.mockito, Test.scalacheck, protobuf)
val remote = Seq(
netty, protobuf, Test.junit, Test.scalatest
)
val remote = Seq(netty, protobuf, Test.junit, Test.scalatest)
val cluster = Seq(Test.junit, Test.scalatest)
@ -480,39 +475,26 @@ object Dependencies {
}
object Dependency {
// Versions
object V {
val Camel = "2.8.0"
val Logback = "1.0.4"
val Netty = "3.5.0.Final"
val Protobuf = "2.4.1"
val ScalaStm = "0.5"
val Scalatest = "1.6.1"
val Slf4j = "1.6.4"
}
// Compile
val config = "com.typesafe" % "config" % "0.4.1" // ApacheV2
val camelCore = "org.apache.camel" % "camel-core" % V.Camel // ApacheV2
val netty = "io.netty" % "netty" % V.Netty // ApacheV2
val protobuf = "com.google.protobuf" % "protobuf-java" % V.Protobuf // New BSD
val scalaStm = "org.scala-tools" %% "scala-stm" % V.ScalaStm // Modified BSD (Scala)
val slf4jApi = "org.slf4j" % "slf4j-api" % V.Slf4j // MIT
val zeroMQ = "org.zeromq" %% "zeromq-scala-binding" % "0.0.6" // ApacheV2
val config = "com.typesafe" % "config" % "0.4.1" // ApacheV2
val camelCore = "org.apache.camel" % "camel-core" % "2.8.0" // ApacheV2
val netty = "io.netty" % "netty" % "3.5.0.Final" // ApacheV2
val protobuf = "com.google.protobuf" % "protobuf-java" % "2.4.1" // New BSD
val scalaStm = "org.scala-tools" %% "scala-stm" % "0.5" // Modified BSD (Scala)
val slf4jApi = "org.slf4j" % "slf4j-api" % "1.6.4" // MIT
val zeroMQ = "org.zeromq" %% "zeromq-scala-binding" % "0.0.6" // ApacheV2
// Test
object Test {
val commonsMath = "org.apache.commons" % "commons-math" % "2.1" % "test" // ApacheV2
val commonsIo = "commons-io" % "commons-io" % "2.0.1" % "test" // ApacheV2
val junit = "junit" % "junit" % "4.5" % "test" // Common Public License 1.0
val logback = "ch.qos.logback" % "logback-classic" % V.Logback % "test" // EPL 1.0 / LGPL 2.1
val mockito = "org.mockito" % "mockito-all" % "1.8.1" % "test" // MIT
val scalatest = "org.scalatest" %% "scalatest" % V.Scalatest % "test" // ApacheV2
val scalacheck = "org.scala-tools.testing" %% "scalacheck" % "1.9" % "test" // New BSD
val specs2 = "org.specs2" %% "specs2" % "1.9" % "test" // Modified BSD / ApacheV2
val commonsMath = "org.apache.commons" % "commons-math" % "2.1" % "test" // ApacheV2
val commonsIo = "commons-io" % "commons-io" % "2.0.1" % "test" // ApacheV2
val junit = "junit" % "junit" % "4.10" % "test" // Common Public License 1.0
val logback = "ch.qos.logback" % "logback-classic" % "1.0.4" % "test" // EPL 1.0 / LGPL 2.1
val mockito = "org.mockito" % "mockito-all" % "1.8.1" % "test" // MIT
val scalatest = "org.scalatest" %% "scalatest" % "1.8-SNAPSHOT" % "test" // ApacheV2
val scalacheck = "org.scalacheck" % "scalacheck_2.10.0-M3" % "1.10-SNAPSHOT" % "test" // New BSD
val specs2 = "org.specs2" %% "specs2" % "1.11" % "test" // Modified BSD / ApacheV2
}
}