From 44dee35d3fea24772af23169836cbe7a90bcac3f Mon Sep 17 00:00:00 2001 From: Derek Mahar Date: Mon, 23 Jul 2012 19:36:26 -0300 Subject: [PATCH 01/32] Update README.textile --- README.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.textile b/README.textile index 293e68a705..b4882ad18c 100644 --- a/README.textile +++ b/README.textile @@ -6,7 +6,7 @@ Akka is here to change that. Using the Actor Model together with Software Transactional Memory we raise the abstraction level and provide a better platform to build correct concurrent and scalable applications. -For fault-tolerance we adopt the "Let it crash" model which have been used with great success in the telecom industry to build applications that self-heal, systems that never stop. +For fault-tolerance we adopt the "Let it crash" model which the telecom industry has used with great success to build applications that self-heal and systems that never stop. Actors also provide the abstraction for transparent distribution and the basis for truly scalable and fault-tolerant applications. From 889a139c8357be5648d907da3ee903369bafeeca Mon Sep 17 00:00:00 2001 From: Derek Mahar Date: Mon, 23 Jul 2012 19:39:29 -0300 Subject: [PATCH 02/32] Corrected some grammatical errors in section "What is Akka?". --- akka-docs/intro/what-is-akka.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/akka-docs/intro/what-is-akka.rst b/akka-docs/intro/what-is-akka.rst index 4bddb27fe6..c379578d6d 100644 --- a/akka-docs/intro/what-is-akka.rst +++ b/akka-docs/intro/what-is-akka.rst @@ -1,4 +1,3 @@ - .. _what-is-akka: ############### @@ -11,10 +10,10 @@ We believe that writing correct concurrent, fault-tolerant and scalable applications is too hard. Most of the time it's because we are using the wrong tools and the wrong level of abstraction. Akka is here to change that. Using the Actor Model we raise the abstraction level and provide a better platform to build -correct concurrent and scalable applications. For fault-tolerance we adopt the -"Let it crash" model which have been used with great success in the telecom industry to build -applications that self-heals, systems that never stop. Actors also provides the -abstraction for transparent distribution and the basis for truly scalable and +correct, concurrent, and scalable applications. For fault-tolerance we adopt the +"Let it crash" model which the telecom industry has used with great success in to +build applications that self-heal and systems that never stop. Actors also provides +the abstraction for transparent distribution and the basis for truly scalable and fault-tolerant applications. Akka is Open Source and available under the Apache 2 License. From 139a919274dec366263c39df66723c257f11a047 Mon Sep 17 00:00:00 2001 From: Derek Mahar Date: Mon, 23 Jul 2012 20:11:23 -0300 Subject: [PATCH 03/32] Corrected grammatical errors. --- akka-docs/intro/what-is-akka.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/akka-docs/intro/what-is-akka.rst b/akka-docs/intro/what-is-akka.rst index 4bddb27fe6..05c9be703e 100644 --- a/akka-docs/intro/what-is-akka.rst +++ b/akka-docs/intro/what-is-akka.rst @@ -1,4 +1,3 @@ - .. _what-is-akka: ############### @@ -107,7 +106,7 @@ The Typesafe Stack is all fully open source. Typesafe Console ================ -On top of the Typesafe Stack we have also have commercial product called Typesafe +On top of the Typesafe Stack we also have a commercial product called Typesafe Console which provides the following features: #. Slick Web UI with real-time view into the system From 0e0c55010af9476e9b2981e4b3c2030641b03f10 Mon Sep 17 00:00:00 2001 From: Derek Mahar Date: Tue, 24 Jul 2012 10:54:04 -0300 Subject: [PATCH 04/32] Corrected grammar errors that Viktor Klang identified in first paragraph of "What is Akka?". --- akka-docs/intro/what-is-akka.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/akka-docs/intro/what-is-akka.rst b/akka-docs/intro/what-is-akka.rst index c379578d6d..78f89f43de 100644 --- a/akka-docs/intro/what-is-akka.rst +++ b/akka-docs/intro/what-is-akka.rst @@ -11,8 +11,8 @@ applications is too hard. Most of the time it's because we are using the wrong tools and the wrong level of abstraction. Akka is here to change that. Using the Actor Model we raise the abstraction level and provide a better platform to build correct, concurrent, and scalable applications. For fault-tolerance we adopt the -"Let it crash" model which the telecom industry has used with great success in to -build applications that self-heal and systems that never stop. Actors also provides +"Let it crash" model which the telecom industry has used with great success to +build applications that self-heal and systems that never stop. Actors also provide the abstraction for transparent distribution and the basis for truly scalable and fault-tolerant applications. From faae09ab4e3a1a57e60b39b775d2b97edf41c84b Mon Sep 17 00:00:00 2001 From: Roland Date: Wed, 25 Jul 2012 20:48:32 +0200 Subject: [PATCH 05/32] add docs for ExtractRoute, see #2337 --- .../java/akka/routing/CustomRouteTest.java | 27 +++++++++++++++++ .../scala/akka/routing/CustomRouteSpec.scala | 30 +++++++++++++------ akka-docs/scala/testing.rst | 14 +++++++++ .../src/main/scala/akka/testkit/Routing.scala | 12 ++++++++ 4 files changed, 74 insertions(+), 9 deletions(-) create mode 100644 akka-actor-tests/src/test/java/akka/routing/CustomRouteTest.java diff --git a/akka-actor-tests/src/test/java/akka/routing/CustomRouteTest.java b/akka-actor-tests/src/test/java/akka/routing/CustomRouteTest.java new file mode 100644 index 0000000000..dc92ace228 --- /dev/null +++ b/akka-actor-tests/src/test/java/akka/routing/CustomRouteTest.java @@ -0,0 +1,27 @@ +/** + * Copyright (C) 2009-2012 Typesafe Inc. + */ +package akka.routing; + +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +import akka.actor.ActorRef; +import akka.actor.ActorSystem; +import akka.actor.Props; +import akka.routing.RoundRobinRouter; +import akka.testkit.ExtractRoute; + +public class CustomRouteTest { + + static private ActorSystem system; + + // only to test compilability + public void testRoute() { + final ActorRef ref = system.actorOf(new Props().withRouter(new RoundRobinRouter(1))); + final scala.Function1, scala.collection.Iterable> route = ExtractRoute.apply(ref); + route.apply(null); + } + +} diff --git a/akka-actor-tests/src/test/scala/akka/routing/CustomRouteSpec.scala b/akka-actor-tests/src/test/scala/akka/routing/CustomRouteSpec.scala index a031ffcefa..940f76266c 100644 --- a/akka-actor-tests/src/test/scala/akka/routing/CustomRouteSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/routing/CustomRouteSpec.scala @@ -4,33 +4,45 @@ package akka.routing import akka.testkit.AkkaSpec -import akka.actor.Props -import akka.actor.OneForOneStrategy -import akka.actor.SupervisorStrategy -import akka.dispatch.Dispatchers -import akka.testkit.ExtractRoute @org.junit.runner.RunWith(classOf[org.scalatest.junit.JUnitRunner]) class CustomRouteSpec extends AkkaSpec { - class MyRouter extends RouterConfig { + //#custom-router + import akka.actor.{ ActorRef, Props, SupervisorStrategy } + import akka.dispatch.Dispatchers + + class MyRouter(target: ActorRef) extends RouterConfig { override def createRoute(p: Props, prov: RouteeProvider): Route = { prov.createAndRegisterRoutees(p, 1, Nil) { - case (sender, message) ⇒ toAll(sender, prov.routees) + case (sender, message: String) ⇒ Seq(Destination(sender, target)) + case (sender, message) ⇒ toAll(sender, prov.routees) } } override def supervisorStrategy = SupervisorStrategy.defaultStrategy override def routerDispatcher = Dispatchers.DefaultDispatcherId } + //#custom-router "A custom RouterConfig" must { "be testable" in { - val router = system.actorOf(Props.empty.withRouter(new MyRouter)) + //#test-route + import akka.pattern.ask + import akka.testkit.ExtractRoute + import scala.concurrent.Await + import scala.concurrent.util.duration._ + + val target = system.actorOf(Props.empty) + val router = system.actorOf(Props.empty.withRouter(new MyRouter(target))) val route = ExtractRoute(router) - route(testActor -> "hallo").size must be(1) + val r = Await.result(router.ask(CurrentRoutees)(1 second).mapTo[RouterRoutees], 1 second) + r.routees.size must be(1) + route(testActor -> "hallo") must be(Seq(Destination(testActor, target))) + route(testActor -> 12) must be(Seq(Destination(testActor, r.routees.head))) + //#test-route } } diff --git a/akka-docs/scala/testing.rst b/akka-docs/scala/testing.rst index d9183e30b5..9ee9dca425 100644 --- a/akka-docs/scala/testing.rst +++ b/akka-docs/scala/testing.rst @@ -707,3 +707,17 @@ Some `Specs2 `_ users have contributed examples of how to wor * Specifications are by default executed concurrently, which requires some care when writing the tests or alternatively the ``sequential`` keyword. + +Testing Custom Router Logic +=========================== + +Given the following custom (dummy) router: + +.. includecode:: ../../akka-actor-tests/src/test/scala/akka/routing/CustomRouteSpec.scala#custom-router + +This might be tested by dispatching messages and asserting their reception at +the right destinations, but that can be inconvenient. Therefore exists the +:obj:`ExtractRoute` extractor, which can be used like so: + +.. includecode:: ../../akka-actor-tests/src/test/scala/akka/routing/CustomRouteSpec.scala#test-route + diff --git a/akka-testkit/src/main/scala/akka/testkit/Routing.scala b/akka-testkit/src/main/scala/akka/testkit/Routing.scala index b32a2eb30a..54fb59b685 100644 --- a/akka-testkit/src/main/scala/akka/testkit/Routing.scala +++ b/akka-testkit/src/main/scala/akka/testkit/Routing.scala @@ -8,6 +8,18 @@ import scala.annotation.tailrec import akka.actor.{ UnstartedCell, ActorRef } import akka.routing.{ RoutedActorRef, RoutedActorCell, Route } +/** + * This object can be used to extract the `Route` out of a RoutedActorRef. + * These are the refs which represent actors created from [[akka.actor.Props]] + * having a [[akka.routing.RouterConfig]]. Use this extractor if you want to + * test the routing directly, i.e. without actually dispatching messages. + * + * {{{ + * val router = system.actorOf(Props[...].withRouter(new MyRouter)) + * val route = ExtractRoute(router) + * route(sender -> message) must be(...) + * }}} + */ object ExtractRoute { def apply(ref: ActorRef): Route = { @tailrec def rec(tries: Int = 10): Route = { From 1114da219897516c8352c781797c71bb0146dab5 Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Thu, 26 Jul 2012 14:47:21 +0200 Subject: [PATCH 06/32] Importing language features used by akka-cluster and akka-remote-tests --- .../src/multi-jvm/scala/akka/cluster/ConvergenceSpec.scala | 2 ++ .../cluster/LeaderDowningNodeThatIsUnreachableSpec.scala | 2 ++ .../multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala | 6 ++++-- .../src/multi-jvm/scala/akka/cluster/SplitBrainSpec.scala | 2 ++ .../src/multi-jvm/scala/akka/cluster/TransitionSpec.scala | 2 ++ .../akka/cluster/UnreachableNodeRejoinsClusterSpec.scala | 2 ++ .../akka/remote/router/RandomRoutedRemoteActorSpec.scala | 2 ++ .../remote/router/RoundRobinRoutedRemoteActorSpec.scala | 2 ++ .../remote/router/ScatterGatherRoutedRemoteActorSpec.scala | 2 ++ .../scala/akka/remote/testconductor/TestConductorSpec.scala | 2 ++ 10 files changed, 22 insertions(+), 2 deletions(-) diff --git a/akka-cluster/src/multi-jvm/scala/akka/cluster/ConvergenceSpec.scala b/akka-cluster/src/multi-jvm/scala/akka/cluster/ConvergenceSpec.scala index 3b268194f3..f29bb97f49 100644 --- a/akka-cluster/src/multi-jvm/scala/akka/cluster/ConvergenceSpec.scala +++ b/akka-cluster/src/multi-jvm/scala/akka/cluster/ConvergenceSpec.scala @@ -3,6 +3,8 @@ */ package akka.cluster +import language.postfixOps + import com.typesafe.config.ConfigFactory import akka.remote.testkit.MultiNodeConfig import akka.remote.testkit.MultiNodeSpec diff --git a/akka-cluster/src/multi-jvm/scala/akka/cluster/LeaderDowningNodeThatIsUnreachableSpec.scala b/akka-cluster/src/multi-jvm/scala/akka/cluster/LeaderDowningNodeThatIsUnreachableSpec.scala index 0ac9fa8344..2ae0a79483 100644 --- a/akka-cluster/src/multi-jvm/scala/akka/cluster/LeaderDowningNodeThatIsUnreachableSpec.scala +++ b/akka-cluster/src/multi-jvm/scala/akka/cluster/LeaderDowningNodeThatIsUnreachableSpec.scala @@ -3,6 +3,8 @@ */ package akka.cluster +import language.postfixOps + import com.typesafe.config.ConfigFactory import akka.remote.testkit.MultiNodeConfig import akka.remote.testkit.MultiNodeSpec diff --git a/akka-cluster/src/multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala b/akka-cluster/src/multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala index 8f280d07bf..2362da8aef 100644 --- a/akka-cluster/src/multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala +++ b/akka-cluster/src/multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala @@ -3,6 +3,8 @@ */ package akka.cluster +import language.implicitConversions + import com.typesafe.config.Config import com.typesafe.config.ConfigFactory import akka.actor.{ Address, ExtendedActorSystem } @@ -12,7 +14,7 @@ import akka.testkit._ import scala.concurrent.util.duration._ import scala.concurrent.util.Duration import org.scalatest.Suite -import org.scalatest.TestFailedException +import org.scalatest.exceptions.TestFailedException import java.util.concurrent.ConcurrentHashMap import akka.actor.ActorPath import akka.actor.RootActorPath @@ -73,7 +75,7 @@ trait MultiNodeClusterSpec extends FailureDetectorStrategy with Suite { self: Mu } super.withFixture(test) } catch { - case t ⇒ + case t: Throwable ⇒ failed = true throw t } diff --git a/akka-cluster/src/multi-jvm/scala/akka/cluster/SplitBrainSpec.scala b/akka-cluster/src/multi-jvm/scala/akka/cluster/SplitBrainSpec.scala index 4f26b55ff5..c2c517fd16 100644 --- a/akka-cluster/src/multi-jvm/scala/akka/cluster/SplitBrainSpec.scala +++ b/akka-cluster/src/multi-jvm/scala/akka/cluster/SplitBrainSpec.scala @@ -3,6 +3,8 @@ */ package akka.cluster +import language.postfixOps + import com.typesafe.config.ConfigFactory import akka.remote.testkit.MultiNodeConfig import akka.remote.testkit.MultiNodeSpec diff --git a/akka-cluster/src/multi-jvm/scala/akka/cluster/TransitionSpec.scala b/akka-cluster/src/multi-jvm/scala/akka/cluster/TransitionSpec.scala index 17c04e5ed0..c86622ce8b 100644 --- a/akka-cluster/src/multi-jvm/scala/akka/cluster/TransitionSpec.scala +++ b/akka-cluster/src/multi-jvm/scala/akka/cluster/TransitionSpec.scala @@ -4,6 +4,8 @@ package akka.cluster +import language.implicitConversions + import com.typesafe.config.ConfigFactory import akka.remote.testkit.MultiNodeConfig import akka.remote.testkit.MultiNodeSpec diff --git a/akka-cluster/src/multi-jvm/scala/akka/cluster/UnreachableNodeRejoinsClusterSpec.scala b/akka-cluster/src/multi-jvm/scala/akka/cluster/UnreachableNodeRejoinsClusterSpec.scala index 9d53ac5458..0ef9dd603f 100644 --- a/akka-cluster/src/multi-jvm/scala/akka/cluster/UnreachableNodeRejoinsClusterSpec.scala +++ b/akka-cluster/src/multi-jvm/scala/akka/cluster/UnreachableNodeRejoinsClusterSpec.scala @@ -3,6 +3,8 @@ */ package akka.cluster +import language.postfixOps + import org.scalatest.BeforeAndAfter import akka.remote.testkit.MultiNodeConfig import akka.remote.testkit.MultiNodeSpec diff --git a/akka-remote-tests/src/multi-jvm/scala/akka/remote/router/RandomRoutedRemoteActorSpec.scala b/akka-remote-tests/src/multi-jvm/scala/akka/remote/router/RandomRoutedRemoteActorSpec.scala index 26ae39088a..6eb601ab8f 100644 --- a/akka-remote-tests/src/multi-jvm/scala/akka/remote/router/RandomRoutedRemoteActorSpec.scala +++ b/akka-remote-tests/src/multi-jvm/scala/akka/remote/router/RandomRoutedRemoteActorSpec.scala @@ -3,6 +3,8 @@ */ package akka.remote.router +import language.postfixOps + import akka.actor.Actor import akka.actor.ActorRef import akka.actor.Props diff --git a/akka-remote-tests/src/multi-jvm/scala/akka/remote/router/RoundRobinRoutedRemoteActorSpec.scala b/akka-remote-tests/src/multi-jvm/scala/akka/remote/router/RoundRobinRoutedRemoteActorSpec.scala index 2107a40f4d..c521964e7f 100644 --- a/akka-remote-tests/src/multi-jvm/scala/akka/remote/router/RoundRobinRoutedRemoteActorSpec.scala +++ b/akka-remote-tests/src/multi-jvm/scala/akka/remote/router/RoundRobinRoutedRemoteActorSpec.scala @@ -3,6 +3,8 @@ */ package akka.remote.router +import language.postfixOps + import akka.actor.Actor import akka.actor.ActorRef import akka.actor.Props diff --git a/akka-remote-tests/src/multi-jvm/scala/akka/remote/router/ScatterGatherRoutedRemoteActorSpec.scala b/akka-remote-tests/src/multi-jvm/scala/akka/remote/router/ScatterGatherRoutedRemoteActorSpec.scala index cfcf7a393d..903731a505 100644 --- a/akka-remote-tests/src/multi-jvm/scala/akka/remote/router/ScatterGatherRoutedRemoteActorSpec.scala +++ b/akka-remote-tests/src/multi-jvm/scala/akka/remote/router/ScatterGatherRoutedRemoteActorSpec.scala @@ -3,6 +3,8 @@ */ package akka.remote.router +import language.postfixOps + import akka.actor.Actor import akka.actor.ActorRef import akka.actor.Props diff --git a/akka-remote-tests/src/multi-jvm/scala/akka/remote/testconductor/TestConductorSpec.scala b/akka-remote-tests/src/multi-jvm/scala/akka/remote/testconductor/TestConductorSpec.scala index 5542688be0..7315bf914d 100644 --- a/akka-remote-tests/src/multi-jvm/scala/akka/remote/testconductor/TestConductorSpec.scala +++ b/akka-remote-tests/src/multi-jvm/scala/akka/remote/testconductor/TestConductorSpec.scala @@ -3,6 +3,8 @@ */ package akka.remote.testconductor +import language.postfixOps + import com.typesafe.config.ConfigFactory import akka.actor.Props import akka.actor.Actor From 54f6184ec4095cb762525a851e63cc1750e77971 Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Thu, 26 Jul 2012 14:48:36 +0200 Subject: [PATCH 07/32] Scoping scalac and javac options to Compile --- project/AkkaBuild.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index e0e61589ae..ae858b323a 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -403,9 +403,9 @@ 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", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Ywarn-adapted-args") ++ ( + scalacOptions in Compile ++= Seq("-encoding", "UTF-8", "-target:jvm-1.6", "-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Ywarn-adapted-args") ++ ( if (true || (System getProperty "java.runtime.version" startsWith "1.7")) Seq() else Seq("-optimize")), // -optimize fails with jdk7 - javacOptions ++= Seq("-Xlint:unchecked", "-Xlint:deprecation"), + javacOptions in Compile ++= Seq("-Xlint:unchecked", "-Xlint:deprecation"), ivyLoggingLevel in ThisBuild := UpdateLogging.Quiet, From fef479eb30444e3668b07bfdbf39232347e75f9b Mon Sep 17 00:00:00 2001 From: Roland Date: Fri, 27 Jul 2012 11:19:37 +0200 Subject: [PATCH 08/32] change timeout of hierarchy stress test to 30.seconds.dilated (takes 10 on my box) --- .../src/test/scala/akka/actor/SupervisorHierarchySpec.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/akka-actor-tests/src/test/scala/akka/actor/SupervisorHierarchySpec.scala b/akka-actor-tests/src/test/scala/akka/actor/SupervisorHierarchySpec.scala index 7a73d6acce..31a732b75e 100644 --- a/akka-actor-tests/src/test/scala/akka/actor/SupervisorHierarchySpec.scala +++ b/akka-actor-tests/src/test/scala/akka/actor/SupervisorHierarchySpec.scala @@ -292,7 +292,7 @@ object SupervisorHierarchySpec { case Init -> Stress ⇒ self ! Work(familySize * 1000) // set timeout for completion of the whole test (i.e. including Finishing and Stopping) - setTimer("phase", StateTimeout, 60 seconds, false) + setTimer("phase", StateTimeout, 30.seconds.dilated, false) } val workSchedule = 250.millis From 5a0e13a094fb171c1cf0b46fb70bc6c7ea98b0e6 Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Fri, 27 Jul 2012 12:54:02 +0200 Subject: [PATCH 09/32] Adding postfixOps to CustomRouteSpec --- .../src/test/scala/akka/routing/CustomRouteSpec.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/akka-actor-tests/src/test/scala/akka/routing/CustomRouteSpec.scala b/akka-actor-tests/src/test/scala/akka/routing/CustomRouteSpec.scala index 940f76266c..ed61d8798f 100644 --- a/akka-actor-tests/src/test/scala/akka/routing/CustomRouteSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/routing/CustomRouteSpec.scala @@ -3,6 +3,8 @@ */ package akka.routing +import language.postfixOps + import akka.testkit.AkkaSpec @org.junit.runner.RunWith(classOf[org.scalatest.junit.JUnitRunner]) From 17d6f9cfa12f1b9e18763c129ee962aa9117f762 Mon Sep 17 00:00:00 2001 From: Roland Date: Fri, 27 Jul 2012 13:09:30 +0200 Subject: [PATCH 10/32] =?UTF-8?q?remove=20guardian=E2=80=99s=20reply=20for?= =?UTF-8?q?=20StopChild,=20see=20#2221?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- akka-actor/src/main/scala/akka/actor/ActorRefProvider.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/akka-actor/src/main/scala/akka/actor/ActorRefProvider.scala b/akka-actor/src/main/scala/akka/actor/ActorRefProvider.scala index fe9c1bca03..124b4e20b2 100644 --- a/akka-actor/src/main/scala/akka/actor/ActorRefProvider.scala +++ b/akka-actor/src/main/scala/akka/actor/ActorRefProvider.scala @@ -405,7 +405,7 @@ class LocalActorRefProvider( case Terminated(_) ⇒ context.stop(self) case CreateChild(child, name) ⇒ sender ! (try context.actorOf(child, name) catch { case NonFatal(e) ⇒ Status.Failure(e) }) case CreateRandomNameChild(child) ⇒ sender ! (try context.actorOf(child) catch { case NonFatal(e) ⇒ Status.Failure(e) }) - case StopChild(child) ⇒ context.stop(child); sender ! "ok" + case StopChild(child) ⇒ context.stop(child) case m ⇒ deadLetters ! DeadLetter(m, sender, self) } From 6b915793e87e8c244b5ab1b70f5a385553e8cd99 Mon Sep 17 00:00:00 2001 From: Roland Date: Fri, 27 Jul 2012 13:58:55 +0200 Subject: [PATCH 11/32] fix REPL cmds for postfixOps --- project/AkkaBuild.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index ae858b323a..d015ab312d 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -44,7 +44,8 @@ object AkkaBuild extends Build { Unidoc.unidocExclude := Seq(samples.id, tutorials.id), Dist.distExclude := Seq(actorTests.id, akkaSbtPlugin.id, docs.id), initialCommands in ThisBuild := - """|import akka.actor._ + """|import language.postfixOps + |import akka.actor._ |import akka.dispatch._ |import com.typesafe.config.ConfigFactory |import scala.concurrent.util.duration._ From a7b1b6c5707893940fc84a5fffbf987fdc9b411e Mon Sep 17 00:00:00 2001 From: Roland Date: Fri, 27 Jul 2012 14:35:34 +0200 Subject: [PATCH 12/32] sphinx: run easy_install in the right directory --- project/Sphinx.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/project/Sphinx.scala b/project/Sphinx.scala index 4707215875..6acb5b3234 100644 --- a/project/Sphinx.scala +++ b/project/Sphinx.scala @@ -32,8 +32,8 @@ object Sphinx { sphinx <<= sphinxTask ) - def pygmentsTask = (sphinxPygmentsDir, sphinxTarget, streams) map { - (pygments, baseTarget, s) => { + def pygmentsTask = (sphinxDocs, sphinxPygmentsDir, sphinxTarget, streams) map { + (cwd, pygments, baseTarget, s) => { val target = baseTarget / "site-packages" val empty = (target * "*.egg").get.isEmpty if (empty) { @@ -42,8 +42,8 @@ object Sphinx { val logger = newLogger(s) val command = Seq("easy_install", "--install-dir", target.absolutePath, pygments.absolutePath) val env = "PYTHONPATH" -> target.absolutePath - s.log.debug("Command: " + command.mkString(" ")) - val exitCode = Process(command, pygments, env) ! logger + s.log.debug("Command: " + command.mkString(" ") + "\nEnv:" + env) + val exitCode = Process(command, cwd, env) ! logger if (exitCode != 0) sys.error("Failed to install custom Sphinx pygments styles.") (pygments * ("*.egg-info" | "build" | "temp")).get.foreach(IO.delete) s.log.info("Sphinx pygments styles installed at: " + target) From b0850010ddcd44cf0b07fa6371228cbf1a58bf66 Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Fri, 27 Jul 2012 13:15:51 +0200 Subject: [PATCH 13/32] Uncommit me --- project/AkkaBuild.scala | 45 ++++++++++++++++------------------------- project/Sphinx.scala | 8 ++++---- project/scripts/release | 2 +- 3 files changed, 22 insertions(+), 33 deletions(-) diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index ae858b323a..b295224dfb 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -15,22 +15,16 @@ import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings import com.typesafe.tools.mima.plugin.MimaKeys.previousArtifact import java.lang.Boolean.getBoolean import sbt.Tests -import Sphinx.{ sphinxDocs, sphinxHtml, sphinxLatex, sphinxPdf, sphinxPygments, sphinxTags } +import Sphinx.{ sphinxDocs, sphinxHtml, sphinxLatex, sphinxPdf, sphinxPygments, sphinxTags, sphinx } object AkkaBuild extends Build { System.setProperty("akka.mode", "test") // Is there better place for this? - - lazy val desiredScalaVersion = "2.10.0-M5" + val enableMiMa = false lazy val buildSettings = Seq( organization := "com.typesafe.akka", version := "2.1-SNAPSHOT", - //scalaVersion := desiredScalaVersion - scalaVersion := "2.10.0-SNAPSHOT", - scalaVersion in update <<= (scalaVersion) apply { - case "2.10.0-SNAPSHOT" => desiredScalaVersion - case x => x - } + scalaVersion := "2.10.0-M6" ) lazy val akka = Project( @@ -333,8 +327,8 @@ object AkkaBuild extends Build { override lazy val settings = super.settings ++ buildSettings ++ Seq( resolvers += "Sonatype Snapshot Repo" at "https://oss.sonatype.org/content/repositories/snapshots/", - //resolvers += "Sonatype Releases Repo" at "https://oss.sonatype.org/content/repositories/releases/", - resolvers += "Typesafe 2.10 Freshness" at "http://typesafe.artifactoryonline.com/typesafe/scala-fresh-2.10.x/", + resolvers += "Sonatype Releases Repo" at "https://oss.sonatype.org/content/repositories/releases/", + resolvers += "Typesafe 2.10 Freshness" at "http://typesafe.artifactoryonline.com/typesafe/scala-fresh-2.10.x/", //FIXME REMOVE shellPrompt := { s => Project.extract(s).currentProject.id + " > " } ) @@ -403,8 +397,7 @@ object AkkaBuild extends Build { resolvers += "Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/", // compile options - scalacOptions in Compile ++= Seq("-encoding", "UTF-8", "-target:jvm-1.6", "-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Ywarn-adapted-args") ++ ( - if (true || (System getProperty "java.runtime.version" startsWith "1.7")) Seq() else Seq("-optimize")), // -optimize fails with jdk7 + scalacOptions in Compile ++= Seq("-encoding", "UTF-8", "-target:jvm-1.6", "-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Ywarn-adapted-args"), javacOptions in Compile ++= Seq("-Xlint:unchecked", "-Xlint:deprecation"), ivyLoggingLevel in ThisBuild := UpdateLogging.Quiet, @@ -472,10 +465,9 @@ object AkkaBuild extends Build { previousArtifact := None ) - def akkaPreviousArtifact(id: String, organization: String = "com.typesafe.akka", version: String = "2.0"): Option[sbt.ModuleID] = { - // the artifact to compare binary compatibility with - Some(organization % id % version) - } + def akkaPreviousArtifact(id: String, organization: String = "com.typesafe.akka", version: String = "2.0"): Option[sbt.ModuleID] = + if (enableMiMa) Some(organization % id % version) // the artifact to compare binary compatibility with + else None } // Dependencies @@ -515,23 +507,20 @@ object Dependencies { val docs = Seq(Test.scalatest, Test.junit, Test.junitIntf) - val zeroMQ = Seq(protobuf, Dependency.zeroMQ, Test.scalatest, Test.junit) + val zeroMQ = Seq(protobuf, zeroMQClient, Test.scalatest, Test.junit) } object Dependency { - - def v(a: String): String = a+"_"+AkkaBuild.desiredScalaVersion - // Compile 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.1.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 scalaStm = "scala-stm" % "scala-stm" % "0.6-SNAPSHOT" //"0.5" // Modified BSD (Scala) - val scalaActors = "org.scala-lang" % "scala-actors" % "2.10.0-SNAPSHOT" + val scalaStm = "scala-stm" % "scala-stm" % "0.6-SNAPSHOT" // FIXME REPLACE WITH BELOW + val scalaActors = "org.scala-lang" % "scala-actors" % "2.10.0-M6" // FIXME REMOVE + //val scalaStm = "org.scala-tools" %% "scala-stm" % "0.6" // Modified BSD (Scala) val slf4jApi = "org.slf4j" % "slf4j-api" % "1.6.4" // MIT - val zeroMQ = "org.zeromq" % v("zeromq-scala-binding") % "0.0.6" // ApacheV2 + val zeroMQClient = "org.zeromq" %% "zeromq-scala-binding" % "0.0.6" // ApacheV2 val uncommonsMath = "org.uncommons.maths" % "uncommons-maths" % "1.2.2a" // ApacheV2 val ariesBlueprint = "org.apache.aries.blueprint" % "org.apache.aries.blueprint" % "0.3.2" // ApacheV2 val osgiCore = "org.osgi" % "org.osgi.core" % "4.2.0" // ApacheV2 @@ -544,9 +533,9 @@ object Dependency { 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" % v("scalatest") % "1.9-2.10.0-M5-B2" % "test" // ApacheV2 - val scalacheck = "org.scalacheck" % v("scalacheck") % "1.10.0" % "test" // New BSD - val ariesProxy = "org.apache.aries.proxy" % "org.apache.aries.proxy.impl" % "0.3" % "test" // ApacheV2 + val scalatest = "org.scalatest" %% "scalatest" % "1.9-2.10.0-M6-B2" % "test" // ApacheV2 + val scalacheck = "org.scalacheck" %% "scalacheck" % "1.10.0" % "test" // New BSD + val ariesProxy = "org.apache.aries.proxy" % "org.apache.aries.proxy.impl" % "0.3" % "test" // ApacheV2 val pojosr = "com.googlecode.pojosr" % "de.kalpatec.pojosr.framework" % "0.1.4" % "test" // ApacheV2 val tinybundles = "org.ops4j.pax.tinybundles" % "tinybundles" % "1.0.0" % "test" // ApacheV2 val log4j = "log4j" % "log4j" % "1.2.14" % "test" // ApacheV2 diff --git a/project/Sphinx.scala b/project/Sphinx.scala index 4707215875..685c30b08b 100644 --- a/project/Sphinx.scala +++ b/project/Sphinx.scala @@ -33,7 +33,7 @@ object Sphinx { ) def pygmentsTask = (sphinxPygmentsDir, sphinxTarget, streams) map { - (pygments, baseTarget, s) => { + (pygments, baseTarget, s) => Sphinx.synchronized { val target = baseTarget / "site-packages" val empty = (target * "*.egg").get.isEmpty if (empty) { @@ -54,7 +54,7 @@ object Sphinx { def buildTask(builder: String, tagsKey: SettingKey[Seq[String]]) = { (cacheDirectory, sphinxDocs, sphinxTarget, sphinxPygments, tagsKey, streams) map { - (cacheDir, docs, baseTarget, pygments, tags, s) => { + (cacheDir, docs, baseTarget, pygments, tags, s) => Sphinx.synchronized { val target = baseTarget / builder val doctrees = baseTarget / "doctrees" val cache = cacheDir / "sphinx" / builder @@ -86,7 +86,7 @@ object Sphinx { } def pdfTask = (sphinxLatex, streams) map { - (latex, s) => { + (latex, s) => Sphinx.synchronized { val pdf = latex / "Akka.pdf" def failed = sys.error("Failed to build Sphinx pdf documentation.") if (!pdf.exists) { @@ -109,7 +109,7 @@ object Sphinx { } def sphinxTask = (sphinxHtml, sphinxPdf, sphinxTarget, streams) map { - (html, pdf, baseTarget, s) => { + (html, pdf, baseTarget, s) => Sphinx.synchronized { val target = baseTarget / "docs" IO.delete(target) IO.copyDirectory(html, target) diff --git a/project/scripts/release b/project/scripts/release index 9e418317bd..a6e14a227e 100755 --- a/project/scripts/release +++ b/project/scripts/release @@ -216,7 +216,7 @@ fi # build the release echolog "Building the release..." try sbt build-release -try cp akka-spring/src/main/resources/akka/spring/akka-*.xsd ${release_dir} +#try cp akka-spring/src/main/resources/akka/spring/akka-*.xsd ${release_dir} echolog "Creating gzipped tar download..." try tar -cz -C ${unzipped_dir} -f ${release_dir}/downloads/akka-${version}.tgz akka-${version} echolog "Successfully created local release" From 2ef7e7a69904367fdaab7196463a5e291cb3e49e Mon Sep 17 00:00:00 2001 From: Roland Date: Fri, 27 Jul 2012 16:42:59 +0200 Subject: [PATCH 14/32] restrict Sphinx tasks to akka-docs cage --- project/AkkaBuild.scala | 16 ++++++---------- project/Release.scala | 5 ++++- project/Sphinx.scala | 11 +++++++---- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index d015ab312d..d2eb7a73f5 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -15,7 +15,7 @@ import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings import com.typesafe.tools.mima.plugin.MimaKeys.previousArtifact import java.lang.Boolean.getBoolean import sbt.Tests -import Sphinx.{ sphinxDocs, sphinxHtml, sphinxLatex, sphinxPdf, sphinxPygments, sphinxTags } +import Sphinx.{ sphinxDocs, sphinxTags } object AkkaBuild extends Build { System.setProperty("akka.mode", "test") // Is there better place for this? @@ -36,7 +36,7 @@ object AkkaBuild extends Build { lazy val akka = Project( id = "akka", base = file("."), - settings = parentSettings ++ Release.settings ++ Unidoc.settings ++ Sphinx.settings ++ Publish.versionSettings ++ + settings = parentSettings ++ Release.settings ++ Unidoc.settings ++ Publish.versionSettings ++ Dist.settings ++ mimaSettings ++ Seq( testMailbox in GlobalScope := System.getProperty("akka.testMailbox", "false").toBoolean, parallelExecution in GlobalScope := System.getProperty("akka.parallelExecution", "false").toBoolean, @@ -57,13 +57,7 @@ object AkkaBuild extends Build { |implicit def ec = system.dispatcher |implicit val timeout = Timeout(5 seconds) |""".stripMargin, - initialCommands in Test in ThisBuild += "import akka.testkit._", - // online version of docs - sphinxDocs <<= baseDirectory / "akka-docs", - sphinxTags in sphinxHtml += "online", - sphinxPygments <<= sphinxPygments in LocalProject(docs.id), - sphinxLatex <<= sphinxLatex in LocalProject(docs.id), - sphinxPdf <<= sphinxPdf in LocalProject(docs.id) + initialCommands in Test in ThisBuild += "import akka.testkit._" ), aggregate = Seq(actor, testkit, actorTests, remote, remoteTests, camel, cluster, slf4j, agent, transactor, mailboxes, zeroMQ, kernel, /*akkaSbtPlugin,*/ samples, tutorials, osgi, osgiAries, docs) ) @@ -326,7 +320,9 @@ object AkkaBuild extends Build { unmanagedSourceDirectories in Test <<= baseDirectory { _ ** "code" get }, libraryDependencies ++= Dependencies.docs, unmanagedSourceDirectories in ScalariformKeys.format in Test <<= unmanagedSourceDirectories in Test, - testOptions += Tests.Argument(TestFrameworks.JUnit, "-v") + testOptions += Tests.Argument(TestFrameworks.JUnit, "-v"), + // online version of docs + sphinxTags in Sphinx.Html += "online" ) ) diff --git a/project/Release.scala b/project/Release.scala index d43766efc2..2d952b21e2 100644 --- a/project/Release.scala +++ b/project/Release.scala @@ -23,7 +23,7 @@ object Release { val repo = extracted.get(Publish.defaultPublishTo) val state1 = extracted.runAggregated(publish in projectRef, state) val (state2, api) = extracted.runTask(Unidoc.unidoc, state1) - val (state3, docs) = extracted.runTask(Sphinx.sphinx, state2) + val (state3, docs) = extracted.runTask(Sphinx.sphinx in docsProject, state2) val (state4, dist) = extracted.runTask(Dist.dist, state3) IO.delete(release) IO.createDirectory(release) @@ -33,4 +33,7 @@ object Release { IO.copyFile(dist, release / "downloads" / dist.name) state4 } + + def docsProject: ProjectReference = LocalProject(AkkaBuild.docs.id) + } diff --git a/project/Sphinx.scala b/project/Sphinx.scala index 6acb5b3234..9fb74913ba 100644 --- a/project/Sphinx.scala +++ b/project/Sphinx.scala @@ -23,15 +23,18 @@ object Sphinx { sphinxDocs <<= baseDirectory, sphinxTarget <<= crossTarget / "sphinx", sphinxPygmentsDir <<= sphinxDocs { _ / "_sphinx" / "pygments" }, - sphinxTags in sphinxHtml := Seq.empty, - sphinxTags in sphinxLatex := Seq.empty, + sphinxTags in Html := Seq.empty, + sphinxTags in Latex := Seq.empty, sphinxPygments <<= pygmentsTask, - sphinxHtml <<= buildTask("html", sphinxTags in sphinxHtml), - sphinxLatex <<= buildTask("latex", sphinxTags in sphinxLatex), + sphinxHtml <<= buildTask("html", sphinxTags in Html), + sphinxLatex <<= buildTask("latex", sphinxTags in Latex), sphinxPdf <<= pdfTask, sphinx <<= sphinxTask ) + lazy val Latex = Configuration("sphinx-latex", "tags for LaTeX version of docs", true, Nil, false) + lazy val Html = Configuration("sphinx-html", "tags for HTML version of docs", true, Nil, false) + def pygmentsTask = (sphinxDocs, sphinxPygmentsDir, sphinxTarget, streams) map { (cwd, pygments, baseTarget, s) => { val target = baseTarget / "site-packages" From 76af653eb33575d02388147a71a8fff985b035ee Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Fri, 27 Jul 2012 18:11:41 +0200 Subject: [PATCH 15/32] Updating Scala-stm to 0.6 --- project/AkkaBuild.scala | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index c16a848d9c..b4ab6e15a6 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -513,9 +513,7 @@ object Dependency { val camelCore = "org.apache.camel" % "camel-core" % "2.8.0" // ApacheV2 val netty = "io.netty" % "netty" % "3.5.1.Final" // ApacheV2 val protobuf = "com.google.protobuf" % "protobuf-java" % "2.4.1" // New BSD - val scalaStm = "scala-stm" % "scala-stm" % "0.6-SNAPSHOT" // FIXME REPLACE WITH BELOW - val scalaActors = "org.scala-lang" % "scala-actors" % "2.10.0-M6" // FIXME REMOVE - //val scalaStm = "org.scala-tools" %% "scala-stm" % "0.6" // Modified BSD (Scala) + val scalaStm = "scala-stm" %% "scala-stm" % "0.6" // Modified BSD (Scala) val slf4jApi = "org.slf4j" % "slf4j-api" % "1.6.4" // MIT val zeroMQClient = "org.zeromq" %% "zeromq-scala-binding" % "0.0.6" // ApacheV2 val uncommonsMath = "org.uncommons.maths" % "uncommons-maths" % "1.2.2a" // ApacheV2 From 93c11e50a397cdf5e93b61971dad5701ba9fd4b3 Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Fri, 27 Jul 2012 19:17:06 +0200 Subject: [PATCH 16/32] Updating to Scala-stm 0.6 --- project/AkkaBuild.scala | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index b4ab6e15a6..559795581f 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -325,7 +325,6 @@ object AkkaBuild extends Build { override lazy val settings = super.settings ++ buildSettings ++ Seq( resolvers += "Sonatype Snapshot Repo" at "https://oss.sonatype.org/content/repositories/snapshots/", resolvers += "Sonatype Releases Repo" at "https://oss.sonatype.org/content/repositories/releases/", - resolvers += "Typesafe 2.10 Freshness" at "http://typesafe.artifactoryonline.com/typesafe/scala-fresh-2.10.x/", //FIXME REMOVE shellPrompt := { s => Project.extract(s).currentProject.id + " > " } ) @@ -484,9 +483,9 @@ object Dependencies { val slf4j = Seq(slf4jApi, Test.logback) - val agent = Seq(scalaStm, scalaActors, Test.scalatest, Test.junit) + val agent = Seq(scalaStm, Test.scalatest, Test.junit) - val transactor = Seq(scalaStm, scalaActors, Test.scalatest, Test.junit) + val transactor = Seq(scalaStm, Test.scalatest, Test.junit) val mailboxes = Seq(Test.scalatest, Test.junit) @@ -513,9 +512,9 @@ object Dependency { val camelCore = "org.apache.camel" % "camel-core" % "2.8.0" // ApacheV2 val netty = "io.netty" % "netty" % "3.5.1.Final" // ApacheV2 val protobuf = "com.google.protobuf" % "protobuf-java" % "2.4.1" // New BSD - val scalaStm = "scala-stm" %% "scala-stm" % "0.6" // Modified BSD (Scala) + val scalaStm = "org.scala-tools" %% "scala-stm" % "0.6" // Modified BSD (Scala) val slf4jApi = "org.slf4j" % "slf4j-api" % "1.6.4" // MIT - val zeroMQClient = "org.zeromq" %% "zeromq-scala-binding" % "0.0.6" // ApacheV2 + val zeroMQClient = "org.zeromq" %% "zeromq-scala-binding" % "0.0.6" // ApacheV2 val uncommonsMath = "org.uncommons.maths" % "uncommons-maths" % "1.2.2a" // ApacheV2 val ariesBlueprint = "org.apache.aries.blueprint" % "org.apache.aries.blueprint" % "0.3.2" // ApacheV2 val osgiCore = "org.osgi" % "org.osgi.core" % "4.2.0" // ApacheV2 @@ -528,8 +527,8 @@ object Dependency { 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.9-2.10.0-M6-B2" % "test" // ApacheV2 - val scalacheck = "org.scalacheck" %% "scalacheck" % "1.10.0" % "test" // New BSD + val scalatest = "org.scalatest" %% "scalatest" % "1.9-2.10.0-M6-B2" % "test" // ApacheV2 + val scalacheck = "org.scalacheck" %% "scalacheck" % "1.10.0" % "test" // New BSD val ariesProxy = "org.apache.aries.proxy" % "org.apache.aries.proxy.impl" % "0.3" % "test" // ApacheV2 val pojosr = "com.googlecode.pojosr" % "de.kalpatec.pojosr.framework" % "0.1.4" % "test" // ApacheV2 val tinybundles = "org.ops4j.pax.tinybundles" % "tinybundles" % "1.0.0" % "test" // ApacheV2 From bc47c421d0a62ca6226b9fa8ee6776fc44e953ca Mon Sep 17 00:00:00 2001 From: Peter Vlugter Date: Sat, 28 Jul 2012 10:43:31 +1200 Subject: [PATCH 17/32] Revert "restrict Sphinx tasks to akka-docs cage" This reverts commit 2ef7e7a69904367fdaab7196463a5e291cb3e49e. --- project/AkkaBuild.scala | 16 ++++++++++------ project/Release.scala | 5 +---- project/Sphinx.scala | 11 ++++------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index 559795581f..d396b17035 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -15,7 +15,7 @@ import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings import com.typesafe.tools.mima.plugin.MimaKeys.previousArtifact import java.lang.Boolean.getBoolean import sbt.Tests -import Sphinx.{ sphinxDocs, sphinxTags } +import Sphinx.{ sphinxDocs, sphinxHtml, sphinxLatex, sphinxPdf, sphinxPygments, sphinxTags } object AkkaBuild extends Build { System.setProperty("akka.mode", "test") // Is there better place for this? @@ -30,7 +30,7 @@ object AkkaBuild extends Build { lazy val akka = Project( id = "akka", base = file("."), - settings = parentSettings ++ Release.settings ++ Unidoc.settings ++ Publish.versionSettings ++ + settings = parentSettings ++ Release.settings ++ Unidoc.settings ++ Sphinx.settings ++ Publish.versionSettings ++ Dist.settings ++ mimaSettings ++ Seq( testMailbox in GlobalScope := System.getProperty("akka.testMailbox", "false").toBoolean, parallelExecution in GlobalScope := System.getProperty("akka.parallelExecution", "false").toBoolean, @@ -51,7 +51,13 @@ object AkkaBuild extends Build { |implicit def ec = system.dispatcher |implicit val timeout = Timeout(5 seconds) |""".stripMargin, - initialCommands in Test in ThisBuild += "import akka.testkit._" + initialCommands in Test in ThisBuild += "import akka.testkit._", + // online version of docs + sphinxDocs <<= baseDirectory / "akka-docs", + sphinxTags in sphinxHtml += "online", + sphinxPygments <<= sphinxPygments in LocalProject(docs.id), + sphinxLatex <<= sphinxLatex in LocalProject(docs.id), + sphinxPdf <<= sphinxPdf in LocalProject(docs.id) ), aggregate = Seq(actor, testkit, actorTests, remote, remoteTests, camel, cluster, slf4j, agent, transactor, mailboxes, zeroMQ, kernel, /*akkaSbtPlugin,*/ samples, tutorials, osgi, osgiAries, docs) ) @@ -314,9 +320,7 @@ object AkkaBuild extends Build { unmanagedSourceDirectories in Test <<= baseDirectory { _ ** "code" get }, libraryDependencies ++= Dependencies.docs, unmanagedSourceDirectories in ScalariformKeys.format in Test <<= unmanagedSourceDirectories in Test, - testOptions += Tests.Argument(TestFrameworks.JUnit, "-v"), - // online version of docs - sphinxTags in Sphinx.Html += "online" + testOptions += Tests.Argument(TestFrameworks.JUnit, "-v") ) ) diff --git a/project/Release.scala b/project/Release.scala index 2d952b21e2..d43766efc2 100644 --- a/project/Release.scala +++ b/project/Release.scala @@ -23,7 +23,7 @@ object Release { val repo = extracted.get(Publish.defaultPublishTo) val state1 = extracted.runAggregated(publish in projectRef, state) val (state2, api) = extracted.runTask(Unidoc.unidoc, state1) - val (state3, docs) = extracted.runTask(Sphinx.sphinx in docsProject, state2) + val (state3, docs) = extracted.runTask(Sphinx.sphinx, state2) val (state4, dist) = extracted.runTask(Dist.dist, state3) IO.delete(release) IO.createDirectory(release) @@ -33,7 +33,4 @@ object Release { IO.copyFile(dist, release / "downloads" / dist.name) state4 } - - def docsProject: ProjectReference = LocalProject(AkkaBuild.docs.id) - } diff --git a/project/Sphinx.scala b/project/Sphinx.scala index 9fb74913ba..6acb5b3234 100644 --- a/project/Sphinx.scala +++ b/project/Sphinx.scala @@ -23,18 +23,15 @@ object Sphinx { sphinxDocs <<= baseDirectory, sphinxTarget <<= crossTarget / "sphinx", sphinxPygmentsDir <<= sphinxDocs { _ / "_sphinx" / "pygments" }, - sphinxTags in Html := Seq.empty, - sphinxTags in Latex := Seq.empty, + sphinxTags in sphinxHtml := Seq.empty, + sphinxTags in sphinxLatex := Seq.empty, sphinxPygments <<= pygmentsTask, - sphinxHtml <<= buildTask("html", sphinxTags in Html), - sphinxLatex <<= buildTask("latex", sphinxTags in Latex), + sphinxHtml <<= buildTask("html", sphinxTags in sphinxHtml), + sphinxLatex <<= buildTask("latex", sphinxTags in sphinxLatex), sphinxPdf <<= pdfTask, sphinx <<= sphinxTask ) - lazy val Latex = Configuration("sphinx-latex", "tags for LaTeX version of docs", true, Nil, false) - lazy val Html = Configuration("sphinx-html", "tags for HTML version of docs", true, Nil, false) - def pygmentsTask = (sphinxDocs, sphinxPygmentsDir, sphinxTarget, streams) map { (cwd, pygments, baseTarget, s) => { val target = baseTarget / "site-packages" From 225ad31e71abc67ff198e88a72d5ff57ee5bfffe Mon Sep 17 00:00:00 2001 From: Peter Vlugter Date: Sat, 28 Jul 2012 10:50:51 +1200 Subject: [PATCH 18/32] Fix sphinx with parallel execution --- project/AkkaBuild.scala | 6 +++--- project/Sphinx.scala | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index d396b17035..0aaa5e17cb 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -55,9 +55,9 @@ object AkkaBuild extends Build { // online version of docs sphinxDocs <<= baseDirectory / "akka-docs", sphinxTags in sphinxHtml += "online", - sphinxPygments <<= sphinxPygments in LocalProject(docs.id), - sphinxLatex <<= sphinxLatex in LocalProject(docs.id), - sphinxPdf <<= sphinxPdf in LocalProject(docs.id) + sphinxPygments <<= sphinxPygments in LocalProject(docs.id) map identity, + sphinxLatex <<= sphinxLatex in LocalProject(docs.id) map identity, + sphinxPdf <<= sphinxPdf in LocalProject(docs.id) map identity ), aggregate = Seq(actor, testkit, actorTests, remote, remoteTests, camel, cluster, slf4j, agent, transactor, mailboxes, zeroMQ, kernel, /*akkaSbtPlugin,*/ samples, tutorials, osgi, osgiAries, docs) ) diff --git a/project/Sphinx.scala b/project/Sphinx.scala index 6acb5b3234..f306dfd31b 100644 --- a/project/Sphinx.scala +++ b/project/Sphinx.scala @@ -56,7 +56,7 @@ object Sphinx { (cacheDirectory, sphinxDocs, sphinxTarget, sphinxPygments, tagsKey, streams) map { (cacheDir, docs, baseTarget, pygments, tags, s) => { val target = baseTarget / builder - val doctrees = baseTarget / "doctrees" + val doctrees = baseTarget / "doctrees" / builder val cache = cacheDir / "sphinx" / builder val cached = FileFunction.cached(cache)(FilesInfo.hash, FilesInfo.exists) { (in, out) => val changes = in.modified From 25c89ae55a0709ba181bf7ec8b838c9f38126200 Mon Sep 17 00:00:00 2001 From: Roland Date: Sat, 28 Jul 2012 08:52:23 +0200 Subject: [PATCH 19/32] =?UTF-8?q?extend=20comment=20explaining=20=E2=80=9C?= =?UTF-8?q?online=20version=20of=20docs=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/AkkaBuild.scala | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index 0aaa5e17cb..67334353a2 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -52,7 +52,15 @@ object AkkaBuild extends Build { |implicit val timeout = Timeout(5 seconds) |""".stripMargin, initialCommands in Test in ThisBuild += "import akka.testkit._", - // online version of docs + /* + * online version of docs: the main docs are generated by + * akka-docs/sphinx and its dependencies, but we need to run the HTML + * part twice, so add it also as akka/sphinx. The trick is to reroute the + * dependencies of that one to their akka-docs/* brothers, for which the + * “map identity” is crucial; if anybody knows how/why, please drop RK a + * line (without it, the pygments task would run twice in parallel for + * the same directory, wreaking the expected amount of havoc). + */ sphinxDocs <<= baseDirectory / "akka-docs", sphinxTags in sphinxHtml += "online", sphinxPygments <<= sphinxPygments in LocalProject(docs.id) map identity, From 92059c9fb06cf2a625ade4002ecf243f8dcb3a2c Mon Sep 17 00:00:00 2001 From: Roland Date: Sat, 28 Jul 2012 09:05:52 +0200 Subject: [PATCH 20/32] fix broken comment --- project/AkkaBuild.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index 67334353a2..3fb657dc1b 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -56,7 +56,7 @@ object AkkaBuild extends Build { * online version of docs: the main docs are generated by * akka-docs/sphinx and its dependencies, but we need to run the HTML * part twice, so add it also as akka/sphinx. The trick is to reroute the - * dependencies of that one to their akka-docs/* brothers, for which the + * dependencies of that one to their akka-docs brothers, for which the * “map identity” is crucial; if anybody knows how/why, please drop RK a * line (without it, the pygments task would run twice in parallel for * the same directory, wreaking the expected amount of havoc). From f2ec59d9e7ce740791e320bed04a93e20982fbb6 Mon Sep 17 00:00:00 2001 From: Roland Date: Sun, 29 Jul 2012 09:37:22 +0200 Subject: [PATCH 21/32] make suspend-test deterministic --- .../src/test/scala/akka/actor/SupervisorHierarchySpec.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/akka-actor-tests/src/test/scala/akka/actor/SupervisorHierarchySpec.scala b/akka-actor-tests/src/test/scala/akka/actor/SupervisorHierarchySpec.scala index 31a732b75e..7fde49c606 100644 --- a/akka-actor-tests/src/test/scala/akka/actor/SupervisorHierarchySpec.scala +++ b/akka-actor-tests/src/test/scala/akka/actor/SupervisorHierarchySpec.scala @@ -483,6 +483,7 @@ class SupervisorHierarchySpec extends AkkaSpec(SupervisorHierarchySpec.config) w EventFilter[Exception]("expected", occurrences = 1) intercept { boss ! "fail" } + awaitCond(worker.asInstanceOf[LocalActorRef].underlying.mailbox.isSuspended) worker ! "ping" expectNoMsg(2 seconds) latch.countDown() From 6c5826ab23c6d43e814a433e167e7e26eff4c323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Klang=20=28=E2=88=9A=29?= Date: Mon, 30 Jul 2012 01:23:33 +0300 Subject: [PATCH 22/32] Updating version range for OSGi --- project/AkkaBuild.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index 3fb657dc1b..536ef49f18 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -585,6 +585,6 @@ object OSGi { def defaultImports = Seq("!sun.misc", akkaImport(), configImport(), scalaImport(), "*") def akkaImport(packageName: String = "akka.*") = "%s;version=\"[2.1,2.2)\"".format(packageName) def configImport(packageName: String = "com.typesafe.config.*") = "%s;version=\"[0.4.1,0.5)\"".format(packageName) - def scalaImport(packageName: String = "scala.*") = "%s;version=\"[2.9.2,2.10)\"".format(packageName) + def scalaImport(packageName: String = "scala.*") = "%s;version=\"[2.10,2.11)\"".format(packageName) } From ef6b78dbc528235cf6aef9f454820be5b6178f30 Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Mon, 30 Jul 2012 13:26:12 +0200 Subject: [PATCH 23/32] #2348 - SI-4804 is fixed so enabling serialversionuids --- akka-actor/src/main/scala/akka/AkkaException.scala | 2 +- .../src/main/scala/akka/actor/ActorPath.scala | 6 +++--- .../src/main/scala/akka/actor/ActorRef.scala | 4 ++-- .../src/main/scala/akka/actor/Deployer.scala | 6 +++--- akka-actor/src/main/scala/akka/actor/Props.scala | 2 +- .../src/main/scala/akka/actor/TypedActor.scala | 2 +- .../src/main/scala/akka/routing/Routing.scala | 14 +++++++------- akka-actor/src/main/scala/akka/util/Duration.scala | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/akka-actor/src/main/scala/akka/AkkaException.scala b/akka-actor/src/main/scala/akka/AkkaException.scala index 8e49c7cb11..5fbf84ed67 100644 --- a/akka-actor/src/main/scala/akka/AkkaException.scala +++ b/akka-actor/src/main/scala/akka/AkkaException.scala @@ -11,7 +11,7 @@ package akka *
  • toString that includes exception name, message and uuid
  • * */ -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) class AkkaException(message: String, cause: Throwable) extends RuntimeException(message, cause) with Serializable { def this(msg: String) = this(msg, null) diff --git a/akka-actor/src/main/scala/akka/actor/ActorPath.scala b/akka-actor/src/main/scala/akka/actor/ActorPath.scala index 1112b90f31..74d7a5540c 100644 --- a/akka-actor/src/main/scala/akka/actor/ActorPath.scala +++ b/akka-actor/src/main/scala/akka/actor/ActorPath.scala @@ -32,7 +32,7 @@ object ActorPath { * is sorted by path elements FROM RIGHT TO LEFT, where RootActorPath > * ChildActorPath in case the number of elements is different. */ -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) sealed trait ActorPath extends Comparable[ActorPath] with Serializable { /** * The Address under which this path can be reached; walks up the tree to @@ -103,7 +103,7 @@ sealed trait ActorPath extends Comparable[ActorPath] with Serializable { * Root of the hierarchy of ActorPaths. There is exactly root per ActorSystem * and node (for remote-enabled or clustered systems). */ -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) final case class RootActorPath(address: Address, name: String = "/") extends ActorPath { override def parent: ActorPath = this @@ -126,7 +126,7 @@ final case class RootActorPath(address: Address, name: String = "/") extends Act } } -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) final class ChildActorPath(val parent: ActorPath, val name: String) extends ActorPath { if (name.indexOf('/') != -1) throw new IllegalArgumentException("/ is a path separator and is not legal in ActorPath names: [%s]" format name) diff --git a/akka-actor/src/main/scala/akka/actor/ActorRef.scala b/akka-actor/src/main/scala/akka/actor/ActorRef.scala index 00a84f956a..f4fcc826c6 100644 --- a/akka-actor/src/main/scala/akka/actor/ActorRef.scala +++ b/akka-actor/src/main/scala/akka/actor/ActorRef.scala @@ -350,7 +350,7 @@ private[akka] class LocalActorRef private[akka] ( * Memento pattern for serializing ActorRefs transparently * INTERNAL API */ -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) private[akka] case class SerializedActorRef private (path: String) { import akka.serialization.JavaSerializer.currentSystem @@ -408,7 +408,7 @@ private[akka] trait MinimalActorRef extends InternalActorRef with LocalRef { case class DeadLetter(message: Any, sender: ActorRef, recipient: ActorRef) private[akka] object DeadLetterActorRef { - //TODO add @SerialVersionUID(1L) when SI-4804 is fixed + @SerialVersionUID(1L) class SerializedDeadLetterActorRef extends Serializable { //TODO implement as Protobuf for performance? @throws(classOf[java.io.ObjectStreamException]) private def readResolve(): AnyRef = JavaSerializer.currentSystem.value.deadLetters diff --git a/akka-actor/src/main/scala/akka/actor/Deployer.scala b/akka-actor/src/main/scala/akka/actor/Deployer.scala index 0d87c849d1..abe4c18a70 100644 --- a/akka-actor/src/main/scala/akka/actor/Deployer.scala +++ b/akka-actor/src/main/scala/akka/actor/Deployer.scala @@ -27,7 +27,7 @@ import annotation.tailrec * context.actorOf(someProps, "someName", Deploy(scope = RemoteScope("someOtherNodeName"))) * }}} */ -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) final case class Deploy( path: String = "", config: Config = ConfigFactory.empty, @@ -76,7 +76,7 @@ trait Scope { def withFallback(other: Scope): Scope } -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) abstract class LocalScope extends Scope //FIXME docs @@ -92,7 +92,7 @@ case object LocalScope extends LocalScope { /** * This is the default value and as such allows overrides. */ -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) abstract class NoScopeGiven extends Scope case object NoScopeGiven extends NoScopeGiven { def withFallback(other: Scope): Scope = other diff --git a/akka-actor/src/main/scala/akka/actor/Props.scala b/akka-actor/src/main/scala/akka/actor/Props.scala index 459ab4da9d..0b6b94526f 100644 --- a/akka-actor/src/main/scala/akka/actor/Props.scala +++ b/akka-actor/src/main/scala/akka/actor/Props.scala @@ -113,7 +113,7 @@ object Props { * Props props = new Props(MyActor.class).withRouter(new RoundRobinRouter(..)); * }}} */ -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed when SI-4804 is fixed +@SerialVersionUID(1L) case class Props( creator: () ⇒ Actor = Props.defaultCreator, dispatcher: String = Dispatchers.DefaultDispatcherId, diff --git a/akka-actor/src/main/scala/akka/actor/TypedActor.scala b/akka-actor/src/main/scala/akka/actor/TypedActor.scala index ddc77a9627..eed2f56efd 100644 --- a/akka-actor/src/main/scala/akka/actor/TypedActor.scala +++ b/akka-actor/src/main/scala/akka/actor/TypedActor.scala @@ -494,7 +494,7 @@ object TypedProps { * TypedProps is a TypedActor configuration object, that is thread safe and fully sharable. * It's used in TypedActorFactory.typedActorOf to configure a TypedActor instance. */ -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) case class TypedProps[T <: AnyRef] protected[TypedProps] ( interfaces: Seq[Class[_]], creator: () ⇒ T, diff --git a/akka-actor/src/main/scala/akka/routing/Routing.scala b/akka-actor/src/main/scala/akka/routing/Routing.scala index 09f1cf9bd8..69eb2de3cc 100644 --- a/akka-actor/src/main/scala/akka/routing/Routing.scala +++ b/akka-actor/src/main/scala/akka/routing/Routing.scala @@ -359,7 +359,7 @@ case class Destination(sender: ActorRef, recipient: ActorRef) * from lower-precedence sources. The decision whether or not to create a * router is taken in the LocalActorRefProvider based on Props. */ -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) abstract class NoRouter extends RouterConfig case object NoRouter extends NoRouter { def createRoute(props: Props, routeeProvider: RouteeProvider): Route = null // FIXME, null, really?? @@ -391,7 +391,7 @@ case object FromConfig extends FromConfig { * This can be used when the dispatcher to be used for the head Router needs to be configured * (defaults to default-dispatcher). */ -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) class FromConfig(val routerDispatcher: String = Dispatchers.DefaultDispatcherId) extends RouterConfig with Serializable { @@ -462,7 +462,7 @@ object RoundRobinRouter { * @param routees string representation of the actor paths of the routees that will be looked up * using `actorFor` in [[akka.actor.ActorRefProvider]] */ -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) case class RoundRobinRouter(nrOfInstances: Int = 0, routees: Iterable[String] = Nil, override val resizer: Option[Resizer] = None, val routerDispatcher: String = Dispatchers.DefaultDispatcherId, val supervisorStrategy: SupervisorStrategy = Router.defaultSupervisorStrategy) @@ -581,7 +581,7 @@ object RandomRouter { * @param routees string representation of the actor paths of the routees that will be looked up * using `actorFor` in [[akka.actor.ActorRefProvider]] */ -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) case class RandomRouter(nrOfInstances: Int = 0, routees: Iterable[String] = Nil, override val resizer: Option[Resizer] = None, val routerDispatcher: String = Dispatchers.DefaultDispatcherId, val supervisorStrategy: SupervisorStrategy = Router.defaultSupervisorStrategy) @@ -707,7 +707,7 @@ object SmallestMailboxRouter { * @param routees string representation of the actor paths of the routees that will be looked up * using `actorFor` in [[akka.actor.ActorRefProvider]] */ -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) case class SmallestMailboxRouter(nrOfInstances: Int = 0, routees: Iterable[String] = Nil, override val resizer: Option[Resizer] = None, val routerDispatcher: String = Dispatchers.DefaultDispatcherId, val supervisorStrategy: SupervisorStrategy = Router.defaultSupervisorStrategy) @@ -907,7 +907,7 @@ object BroadcastRouter { * @param routees string representation of the actor paths of the routees that will be looked up * using `actorFor` in [[akka.actor.ActorRefProvider]] */ -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) case class BroadcastRouter(nrOfInstances: Int = 0, routees: Iterable[String] = Nil, override val resizer: Option[Resizer] = None, val routerDispatcher: String = Dispatchers.DefaultDispatcherId, val supervisorStrategy: SupervisorStrategy = Router.defaultSupervisorStrategy) @@ -1018,7 +1018,7 @@ object ScatterGatherFirstCompletedRouter { * @param routees string representation of the actor paths of the routees that will be looked up * using `actorFor` in [[akka.actor.ActorRefProvider]] */ -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) case class ScatterGatherFirstCompletedRouter(nrOfInstances: Int = 0, routees: Iterable[String] = Nil, within: Duration, override val resizer: Option[Resizer] = None, val routerDispatcher: String = Dispatchers.DefaultDispatcherId, diff --git a/akka-actor/src/main/scala/akka/util/Duration.scala b/akka-actor/src/main/scala/akka/util/Duration.scala index b8de5a62bf..7080775d9b 100644 --- a/akka-actor/src/main/scala/akka/util/Duration.scala +++ b/akka-actor/src/main/scala/akka/util/Duration.scala @@ -10,7 +10,7 @@ import java.util.concurrent.TimeUnit import java.lang.{ Double ⇒ JDouble } import scala.concurrent.util.Duration -//TODO add @SerialVersionUID(1L) when SI-4804 is fixed +@SerialVersionUID(1L) case class Timeout(duration: Duration) { def this(timeout: Long) = this(Duration(timeout, TimeUnit.MILLISECONDS)) def this(length: Long, unit: TimeUnit) = this(Duration(length, unit)) From 9a1ae214def602846198bc360602038f2918e3ad Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Mon, 30 Jul 2012 13:57:32 +0200 Subject: [PATCH 24/32] #2261 - adding rewrites of Akka github urls to solidify on release --- project/scripts/release | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/project/scripts/release b/project/scripts/release index a6e14a227e..b4f9b9cda2 100755 --- a/project/scripts/release +++ b/project/scripts/release @@ -203,6 +203,12 @@ try git checkout -b ${release_branch} # find and replace the version try ${script_dir}/find-replace ${current_version} ${version} +#find and replace github links +try ${script_dir}/find-replace http://github.com/akka/akka/tree/master http://github.com/akka/akka/tree/v${version} +try ${script_dir}/find-replace https://github.com/akka/akka/tree/master http://github.com/akka/akka/tree/v${version} +try ${script_dir}/find-replace http://github.com/akka/akka/blob/master http://github.com/akka/akka/tree/v${version} +try ${script_dir}/find-replace https://github.com/akka/akka/blob/master http://github.com/akka/akka/tree/v${version} + # start clean try sbt clean From 12f79f1bbffb6018da4c83bc95a2994823480ab7 Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Mon, 30 Jul 2012 16:19:26 +0200 Subject: [PATCH 25/32] #2338 - Akka Sbt Plugin now in build --- project/AkkaBuild.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index 536ef49f18..3a434b6980 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -67,7 +67,7 @@ object AkkaBuild extends Build { sphinxLatex <<= sphinxLatex in LocalProject(docs.id) map identity, sphinxPdf <<= sphinxPdf in LocalProject(docs.id) map identity ), - aggregate = Seq(actor, testkit, actorTests, remote, remoteTests, camel, cluster, slf4j, agent, transactor, mailboxes, zeroMQ, kernel, /*akkaSbtPlugin,*/ samples, tutorials, osgi, osgiAries, docs) + aggregate = Seq(actor, testkit, actorTests, remote, remoteTests, camel, cluster, slf4j, agent, transactor, mailboxes, zeroMQ, kernel, akkaSbtPlugin, samples, tutorials, osgi, osgiAries, docs) ) lazy val actor = Project( @@ -264,6 +264,7 @@ object AkkaBuild extends Build { base = file("akka-sbt-plugin"), settings = defaultSettings ++ Seq( sbtPlugin := true, + scalacOptions in Compile := Seq("-encoding", "UTF-8", "-deprecation", "-unchecked"), scalaVersion := "2.9.1" ) ) @@ -406,7 +407,7 @@ object AkkaBuild extends Build { // compile options scalacOptions in Compile ++= Seq("-encoding", "UTF-8", "-target:jvm-1.6", "-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Ywarn-adapted-args"), - javacOptions in Compile ++= Seq("-Xlint:unchecked", "-Xlint:deprecation"), + javacOptions in Compile ++= Seq("-target", "1.6", "-Xlint:unchecked", "-Xlint:deprecation"), ivyLoggingLevel in ThisBuild := UpdateLogging.Quiet, From 5b25ef4ad29d214272849a0ea9d46751f3d7283e Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Tue, 31 Jul 2012 12:54:31 +0200 Subject: [PATCH 26/32] Adding more SerialVersionUIDs --- .../src/main/scala/akka/actor/Actor.scala | 21 +++++++++++++++++++ .../src/main/scala/akka/actor/ActorRef.scala | 1 + .../src/main/scala/akka/actor/Address.scala | 1 + .../src/main/scala/akka/routing/Routing.scala | 7 ++++++- 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/akka-actor/src/main/scala/akka/actor/Actor.scala b/akka-actor/src/main/scala/akka/actor/Actor.scala index c1ae9c57bf..bf8a488cd9 100644 --- a/akka-actor/src/main/scala/akka/actor/Actor.scala +++ b/akka-actor/src/main/scala/akka/actor/Actor.scala @@ -29,6 +29,7 @@ trait NoSerializationVerificationNeeded /** * Internal use only */ +@SerialVersionUID(1L) private[akka] case class Failed(cause: Throwable) extends AutoReceivedMessage with PossiblyHarmful abstract class PoisonPill extends AutoReceivedMessage with PossiblyHarmful @@ -36,6 +37,7 @@ abstract class PoisonPill extends AutoReceivedMessage with PossiblyHarmful /** * A message all Actors will understand, that when processed will terminate the Actor permanently. */ +@SerialVersionUID(1L) case object PoisonPill extends PoisonPill { /** * Java API: get the singleton instance @@ -48,6 +50,7 @@ abstract class Kill extends AutoReceivedMessage with PossiblyHarmful * A message all Actors will understand, that when processed will make the Actor throw an ActorKilledException, * which will trigger supervision. */ +@SerialVersionUID(1L) case object Kill extends Kill { /** * Java API: get the singleton instance @@ -58,6 +61,7 @@ case object Kill extends Kill { /** * When Death Watch is used, the watcher will receive a Terminated(watched) message when watched is terminated. */ +@SerialVersionUID(1L) case class Terminated(@BeanProperty actor: ActorRef)(@BeanProperty val existenceConfirmed: Boolean) extends AutoReceivedMessage abstract class ReceiveTimeout extends PossiblyHarmful @@ -66,6 +70,7 @@ abstract class ReceiveTimeout extends PossiblyHarmful * When using ActorContext.setReceiveTimeout, the singleton instance of ReceiveTimeout will be sent * to the Actor when there hasn't been any message for that long. */ +@SerialVersionUID(1L) case object ReceiveTimeout extends ReceiveTimeout { /** * Java API: get the singleton instance @@ -83,22 +88,26 @@ sealed trait SelectionPath extends AutoReceivedMessage /** * Internal use only */ +@SerialVersionUID(1L) private[akka] case class SelectChildName(name: String, next: Any) extends SelectionPath /** * Internal use only */ +@SerialVersionUID(1L) private[akka] case class SelectChildPattern(pattern: Pattern, next: Any) extends SelectionPath /** * Internal use only */ +@SerialVersionUID(1L) private[akka] case class SelectParent(next: Any) extends SelectionPath /** * IllegalActorStateException is thrown when a core invariant in the Actor implementation has been violated. * For instance, if you try to create an Actor that doesn't extend Actor. */ +@SerialVersionUID(1L) class IllegalActorStateException private[akka] (message: String, cause: Throwable = null) extends AkkaException(message, cause) { def this(msg: String) = this(msg, null) @@ -107,6 +116,7 @@ class IllegalActorStateException private[akka] (message: String, cause: Throwabl /** * ActorKilledException is thrown when an Actor receives the akka.actor.Kill message */ +@SerialVersionUID(1L) class ActorKilledException private[akka] (message: String, cause: Throwable) extends AkkaException(message, cause) with NoStackTrace { @@ -117,11 +127,13 @@ class ActorKilledException private[akka] (message: String, cause: Throwable) * An InvalidActorNameException is thrown when you try to convert something, usually a String, to an Actor name * which doesn't validate. */ +@SerialVersionUID(1L) class InvalidActorNameException(message: String) extends AkkaException(message) /** * An ActorInitializationException is thrown when the the initialization logic for an Actor fails. */ +@SerialVersionUID(1L) class ActorInitializationException private[akka] (val actor: ActorRef, message: String, cause: Throwable) extends AkkaException(message, cause) { def this(msg: String) = this(null, msg, null) @@ -136,6 +148,7 @@ class ActorInitializationException private[akka] (val actor: ActorRef, message: * @param origCause is the exception which caused the restart in the first place * @param msg is the message which was optionally passed into preRestart() */ +@SerialVersionUID(1L) class PreRestartException private[akka] (actor: ActorRef, cause: Throwable, val origCause: Throwable, val msg: Option[Any]) extends ActorInitializationException(actor, "exception in preRestart(" + origCause.getClass + ", " + msg.map(_.getClass) + ")", cause) { } @@ -148,6 +161,7 @@ class PreRestartException private[akka] (actor: ActorRef, cause: Throwable, val * @param cause is the exception thrown by that actor within preRestart() * @param origCause is the exception which caused the restart in the first place */ +@SerialVersionUID(1L) class PostRestartException private[akka] (actor: ActorRef, cause: Throwable, val origCause: Throwable) extends ActorInitializationException(actor, "exception post restart (" + origCause.getClass + ")", cause) { } @@ -157,6 +171,7 @@ class PostRestartException private[akka] (actor: ActorRef, cause: Throwable, val * Technically it's only "null" which is an InvalidMessageException but who knows, * there might be more of them in the future, or not. */ +@SerialVersionUID(1L) class InvalidMessageException private[akka] (message: String, cause: Throwable = null) extends AkkaException(message, cause) { def this(msg: String) = this(msg, null) @@ -166,6 +181,7 @@ class InvalidMessageException private[akka] (message: String, cause: Throwable = * A DeathPactException is thrown by an Actor that receives a Terminated(someActor) message * that it doesn't handle itself, effectively crashing the Actor and escalating to the supervisor. */ +@SerialVersionUID(1L) case class DeathPactException private[akka] (dead: ActorRef) extends AkkaException("Monitored actor [" + dead + "] terminated") with NoStackTrace @@ -174,11 +190,13 @@ case class DeathPactException private[akka] (dead: ActorRef) * When an InterruptedException is thrown inside an Actor, it is wrapped as an ActorInterruptedException as to * avoid cascading interrupts to other threads than the originally interrupted one. */ +@SerialVersionUID(1L) class ActorInterruptedException private[akka] (cause: Throwable) extends AkkaException(cause.getMessage, cause) with NoStackTrace /** * This message is published to the EventStream whenever an Actor receives a message it doesn't understand */ +@SerialVersionUID(1L) case class UnhandledMessage(@BeanProperty message: Any, @BeanProperty sender: ActorRef, @BeanProperty recipient: ActorRef) /** @@ -191,12 +209,14 @@ object Status { /** * This class/message type is preferably used to indicate success of some operation performed. */ + @SerialVersionUID(1L) case class Success(status: AnyRef) extends Status /** * This class/message type is preferably used to indicate failure of some operation performed. * As an example, it is used to signal failure with AskSupport is used (ask/?). */ + @SerialVersionUID(1L) case class Failure(cause: Throwable) extends Status } @@ -224,6 +244,7 @@ object Actor { /** * emptyBehavior is a Receive-expression that matches no messages at all, ever. */ + @SerialVersionUID(1L) object emptyBehavior extends Receive { def isDefinedAt(x: Any) = false def apply(x: Any) = throw new UnsupportedOperationException("Empty behavior apply()") diff --git a/akka-actor/src/main/scala/akka/actor/ActorRef.scala b/akka-actor/src/main/scala/akka/actor/ActorRef.scala index f4fcc826c6..3acae25613 100644 --- a/akka-actor/src/main/scala/akka/actor/ActorRef.scala +++ b/akka-actor/src/main/scala/akka/actor/ActorRef.scala @@ -405,6 +405,7 @@ private[akka] trait MinimalActorRef extends InternalActorRef with LocalRef { * When a message is sent to an Actor that is terminated before receiving the message, it will be sent as a DeadLetter * to the ActorSystem's EventStream */ +@SerialVersionUID(1L) case class DeadLetter(message: Any, sender: ActorRef, recipient: ActorRef) private[akka] object DeadLetterActorRef { diff --git a/akka-actor/src/main/scala/akka/actor/Address.scala b/akka-actor/src/main/scala/akka/actor/Address.scala index 44c12eed35..438c479176 100644 --- a/akka-actor/src/main/scala/akka/actor/Address.scala +++ b/akka-actor/src/main/scala/akka/actor/Address.scala @@ -16,6 +16,7 @@ import annotation.tailrec * for example a remote transport would want to associate additional * information with an address, then this must be done externally. */ +@SerialVersionUID(1L) final case class Address private (protocol: String, system: String, host: Option[String], port: Option[Int]) { def this(protocol: String, system: String) = this(protocol, system, None, None) diff --git a/akka-actor/src/main/scala/akka/routing/Routing.scala b/akka-actor/src/main/scala/akka/routing/Routing.scala index 69eb2de3cc..6ffbc98f00 100644 --- a/akka-actor/src/main/scala/akka/routing/Routing.scala +++ b/akka-actor/src/main/scala/akka/routing/Routing.scala @@ -310,7 +310,7 @@ trait Router extends Actor { * INTERNAL API */ private object Router { - + @SerialVersionUID(1L) case object Resize val defaultSupervisorStrategy: SupervisorStrategy = OneForOneStrategy() { @@ -325,6 +325,7 @@ private object Router { * * Router implementations may choose to handle this message differently. */ +@SerialVersionUID(1L) case class Broadcast(message: Any) /** @@ -333,6 +334,7 @@ case class Broadcast(message: Any) * about what routees the router is routing over. */ abstract class CurrentRoutees +@SerialVersionUID(1L) case object CurrentRoutees extends CurrentRoutees { /** * Java API: get the singleton instance @@ -343,6 +345,7 @@ case object CurrentRoutees extends CurrentRoutees { /** * Message used to carry information about what routees the router is currently using. */ +@SerialVersionUID(1L) case class RouterRoutees(routees: Iterable[ActorRef]) /** @@ -351,6 +354,7 @@ case class RouterRoutees(routees: Iterable[ActorRef]) * sender should match the sender of the original request, but e.g. the scatter- * gather router needs to receive the replies with an AskActorRef instead. */ +@SerialVersionUID(1L) case class Destination(sender: ActorRef, recipient: ActorRef) /** @@ -1132,6 +1136,7 @@ case object DefaultResizer { } //FIXME DOCUMENT ME +@SerialVersionUID(1L) case class DefaultResizer( /** * The fewest number of routees the router should ever have. From a6a3ee1954fc9d8e12472e05582e6017fd6a98d8 Mon Sep 17 00:00:00 2001 From: Roland Date: Wed, 1 Aug 2012 12:11:51 +0200 Subject: [PATCH 27/32] make random router test less random, hopefully fixes #2293 --- .../test/scala/akka/routing/ConfiguredLocalRoutingSpec.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/akka-actor-tests/src/test/scala/akka/routing/ConfiguredLocalRoutingSpec.scala b/akka-actor-tests/src/test/scala/akka/routing/ConfiguredLocalRoutingSpec.scala index cde57e7607..ab212f8901 100644 --- a/akka-actor-tests/src/test/scala/akka/routing/ConfiguredLocalRoutingSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/routing/ConfiguredLocalRoutingSpec.scala @@ -231,7 +231,7 @@ class ConfiguredLocalRoutingSpec extends AkkaSpec(ConfiguredLocalRoutingSpec.con "deliver messages in a random fashion" in { val connectionCount = 10 - val iterationCount = 10 + val iterationCount = 100 val doneLatch = new TestLatch(connectionCount) val counter = new AtomicInteger From 3c15ba3a990412c16beec315d223b16111d0f48a Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Wed, 1 Aug 2012 12:22:20 +0200 Subject: [PATCH 28/32] Switching to Futures instead of Actors for seeding the FutureSpec --- .../test/scala/akka/dispatch/FutureSpec.scala | 60 ++++--------------- 1 file changed, 13 insertions(+), 47 deletions(-) diff --git a/akka-actor-tests/src/test/scala/akka/dispatch/FutureSpec.scala b/akka-actor-tests/src/test/scala/akka/dispatch/FutureSpec.scala index e097e5c688..96c9f6a0d9 100644 --- a/akka-actor-tests/src/test/scala/akka/dispatch/FutureSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/dispatch/FutureSpec.scala @@ -383,14 +383,7 @@ class FutureSpec extends AkkaSpec with Checkers with BeforeAndAfterAll with Defa } "fold" in { - val actors = (1 to 10).toList map { _ ⇒ - system.actorOf(Props(new Actor { - def receive = { case (add: Int, wait: Int) ⇒ Thread.sleep(wait); sender.tell(add) } - })) - } - val timeout = 10000 - def futures = actors.zipWithIndex map { case (actor: ActorRef, idx: Int) ⇒ actor.?((idx, idx * 200))(timeout).mapTo[Int] } - Await.result(Future.fold(futures)(0)(_ + _), timeout millis) must be(45) + Await.result(Future.fold((1 to 10).toList map { i ⇒ Future(i) })(0)(_ + _), remaining) must be(55) } "zip" in { @@ -412,30 +405,17 @@ class FutureSpec extends AkkaSpec with Checkers with BeforeAndAfterAll with Defa } "fold by composing" in { - val actors = (1 to 10).toList map { _ ⇒ - system.actorOf(Props(new Actor { - def receive = { case (add: Int, wait: Int) ⇒ Thread.sleep(wait); sender.tell(add) } - })) - } - def futures = actors.zipWithIndex map { case (actor: ActorRef, idx: Int) ⇒ actor.?((idx, idx * 200))(10000).mapTo[Int] } - Await.result(futures.foldLeft(Future(0))((fr, fa) ⇒ for (r ← fr; a ← fa) yield (r + a)), timeout.duration) must be(45) + val futures = (1 to 10).toList map { i ⇒ Future(i) } + Await.result(futures.foldLeft(Future(0))((fr, fa) ⇒ for (r ← fr; a ← fa) yield (r + a)), timeout.duration) must be(55) } "fold with an exception" in { filterException[IllegalArgumentException] { - val actors = (1 to 10).toList map { _ ⇒ - system.actorOf(Props(new Actor { - def receive = { - case (add: Int, wait: Int) ⇒ - Thread.sleep(wait) - if (add == 6) sender ! Status.Failure(new IllegalArgumentException("shouldFoldResultsWithException: expected")) - else sender.tell(add) - } - })) + val futures = (1 to 10).toList map { + case 6 ⇒ Future(throw new IllegalArgumentException("shouldFoldResultsWithException: expected")) + case i ⇒ Future(i) } - val timeout = 10000 - def futures = actors.zipWithIndex map { case (actor: ActorRef, idx: Int) ⇒ actor.?((idx, idx * 100))(timeout).mapTo[Int] } - intercept[Throwable] { Await.result(Future.fold(futures)(0)(_ + _), timeout millis) }.getMessage must be("shouldFoldResultsWithException: expected") + intercept[Throwable] { Await.result(Future.fold(futures)(0)(_ + _), remaining) }.getMessage must be("shouldFoldResultsWithException: expected") } } @@ -460,31 +440,17 @@ class FutureSpec extends AkkaSpec with Checkers with BeforeAndAfterAll with Defa } "shouldReduceResults" in { - val actors = (1 to 10).toList map { _ ⇒ - system.actorOf(Props(new Actor { - def receive = { case (add: Int, wait: Int) ⇒ Thread.sleep(wait); sender.tell(add) } - })) - } - val timeout = 10000 - def futures = actors.zipWithIndex map { case (actor: ActorRef, idx: Int) ⇒ actor.?((idx, idx * 200))(timeout).mapTo[Int] } - assert(Await.result(Future.reduce(futures)(_ + _), timeout millis) === 45) + val futures = (1 to 10).toList map { i ⇒ Future(i) } + assert(Await.result(Future.reduce(futures)(_ + _), remaining) === 55) } "shouldReduceResultsWithException" in { filterException[IllegalArgumentException] { - val actors = (1 to 10).toList map { _ ⇒ - system.actorOf(Props(new Actor { - def receive = { - case (add: Int, wait: Int) ⇒ - Thread.sleep(wait) - if (add == 6) sender ! Status.Failure(new IllegalArgumentException("shouldFoldResultsWithException: expected")) - else sender.tell(add) - } - })) + val futures = (1 to 10).toList map { + case 6 ⇒ Future(throw new IllegalArgumentException("shouldReduceResultsWithException: expected")) + case i ⇒ Future(i) } - val timeout = 10000 - def futures = actors.zipWithIndex map { case (actor: ActorRef, idx: Int) ⇒ actor.?((idx, idx * 100))(timeout).mapTo[Int] } - intercept[Throwable] { Await.result(Future.reduce(futures)(_ + _), timeout millis) }.getMessage must be === "shouldFoldResultsWithException: expected" + intercept[Throwable] { Await.result(Future.reduce(futures)(_ + _), remaining) }.getMessage must be === "shouldReduceResultsWithException: expected" } } From 3cf023e72357cb1d861d0a5a7ad8b64e53cd1487 Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Thu, 2 Aug 2012 11:40:27 +0200 Subject: [PATCH 29/32] Dropping the use of ExecutionContext.MODULE$ --- akka-docs/java/code/docs/future/FutureDocTestBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/akka-docs/java/code/docs/future/FutureDocTestBase.java b/akka-docs/java/code/docs/future/FutureDocTestBase.java index e6c482a66d..d84c728dfe 100644 --- a/akka-docs/java/code/docs/future/FutureDocTestBase.java +++ b/akka-docs/java/code/docs/future/FutureDocTestBase.java @@ -86,7 +86,7 @@ public class FutureDocTestBase { ExecutorService yourExecutorServiceGoesHere = Executors.newSingleThreadExecutor(); //#diy-execution-context ExecutionContext ec = - ExecutionContext$.MODULE$.fromExecutorService(yourExecutorServiceGoesHere); + ExecutionContexts.fromExecutorService(yourExecutorServiceGoesHere); //Use ec with your Futures Future f1 = Futures.successful("foo"); From 16f8ab20c8cb29c88516b51f5663144a3df2375a Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Thu, 2 Aug 2012 12:15:29 +0200 Subject: [PATCH 30/32] Formatting: sequence should be formatted as traverse --- akka-actor/src/main/scala/akka/dispatch/Future.scala | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/akka-actor/src/main/scala/akka/dispatch/Future.scala b/akka-actor/src/main/scala/akka/dispatch/Future.scala index 80d57a6dca..0ab004fc59 100644 --- a/akka-actor/src/main/scala/akka/dispatch/Future.scala +++ b/akka-actor/src/main/scala/akka/dispatch/Future.scala @@ -128,11 +128,9 @@ object Futures { */ def sequence[A](in: JIterable[Future[A]], executor: ExecutionContext): Future[JIterable[A]] = { implicit val d = executor - scala.collection.JavaConversions.iterableAsScalaIterable(in).foldLeft(Future(new JLinkedList[A]()))((fr, fa) ⇒ - for (r ← fr; a ← fa) yield { - r add a - r - }) + scala.collection.JavaConversions.iterableAsScalaIterable(in).foldLeft(Future(new JLinkedList[A]())) { (fr, fa) ⇒ + for (r ← fr; a ← fa) yield { r add a; r } + } } /** From eb23b5b88dd6ebfad99fd2885469f84e5837380f Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Thu, 2 Aug 2012 16:02:31 +0200 Subject: [PATCH 31/32] Removing the now not-needed dep on scala-reflect.jar --- project/AkkaBuild.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index 536ef49f18..863773e88c 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -75,7 +75,6 @@ object AkkaBuild extends Build { base = file("akka-actor"), settings = defaultSettings ++ OSGi.actor ++ Seq( autoCompilerPlugins := true, - libraryDependencies <+= scalaVersion { v => "org.scala-lang" % "scala-reflect" % v }, packagedArtifact in (Compile, packageBin) <<= (artifact in (Compile, packageBin), OsgiKeys.bundle).identityMap, artifact in (Compile, packageBin) ~= (_.copy(`type` = "bundle")), // to fix scaladoc generation From 2fd04db55ed8e867bf8ff6c7932aecc6bffc3b01 Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Mon, 6 Aug 2012 11:31:34 +0200 Subject: [PATCH 32/32] Clarifying reference documentation regarding connection-timeout --- akka-remote/src/main/resources/reference.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/akka-remote/src/main/resources/reference.conf b/akka-remote/src/main/resources/reference.conf index 64c2e1a840..7ae3219c5d 100644 --- a/akka-remote/src/main/resources/reference.conf +++ b/akka-remote/src/main/resources/reference.conf @@ -116,7 +116,8 @@ akka { # (I&O) Increase this if you want to be able to send messages with large payloads message-frame-size = 1 MiB - # (O) Timeout duration + # (O) Sets the connectTimeoutMillis of all outbound connections, + # i.e. how long a connect may take until it is timed out connection-timeout = 120s # (I) Sets the size of the connection backlog