From c46c4cc279b0216b19bd5ac4684a04f6de63e574 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Wed, 4 May 2011 20:49:35 +0200 Subject: [PATCH 1/5] Fixed toRemoteActorRefProtocol --- akka-docs/scala/serialization.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/akka-docs/scala/serialization.rst b/akka-docs/scala/serialization.rst index 7a9541b69a..8ac5e1c8e1 100644 --- a/akka-docs/scala/serialization.rst +++ b/akka-docs/scala/serialization.rst @@ -217,9 +217,11 @@ Here is an example of how to serialize an Actor. .. code-block:: scala + import akka.serialization.RemoteActorSerialization._ + val actor1 = actorOf[MyActor] - val bytes = toBinary(actor1) + val bytes = toRemoteActorRefProtocol(actor1).toByteArray To deserialize the ``ActorRef`` to a ``RemoteActorRef`` you need to use the ``fromBinaryToRemoteActorRef(bytes: Array[Byte])`` method on the ``ActorRef`` companion object: From dafd04ad4887d6b48bd53f48cca1c5f2a989c8c7 Mon Sep 17 00:00:00 2001 From: Peter Vlugter Date: Thu, 5 May 2011 11:02:41 +1200 Subject: [PATCH 2/5] Update to scala RC3 --- project/build.properties | 2 +- project/build/AkkaProject.scala | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/project/build.properties b/project/build.properties index 8275b16e18..ccf3e56038 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1,5 +1,5 @@ project.organization=se.scalablesolutions.akka project.name=akka project.version=1.1-SNAPSHOT -build.scala.versions=2.9.0.RC1 +build.scala.versions=2.9.0.RC3 sbt.version=0.7.6.RC0 diff --git a/project/build/AkkaProject.scala b/project/build/AkkaProject.scala index 1090224483..f3fd2c19af 100644 --- a/project/build/AkkaProject.scala +++ b/project/build/AkkaProject.scala @@ -61,7 +61,7 @@ class AkkaParentProject(info: ProjectInfo) extends DefaultProject(info) with Aut lazy val jerseyModuleConfig = ModuleConfiguration("com.sun.jersey", JavaNetRepo) lazy val multiverseModuleConfig = ModuleConfiguration("org.multiverse", CodehausRepo) lazy val nettyModuleConfig = ModuleConfiguration("org.jboss.netty", JBossRepo) - lazy val scalaTestModuleConfig = ModuleConfiguration("org.scalatest", ScalaToolsSnapshotRepo) + lazy val scalaTestModuleConfig = ModuleConfiguration("org.scalatest", ScalaToolsRelRepo) lazy val spdeModuleConfig = ModuleConfiguration("us.technically.spde", DatabinderRepo) lazy val processingModuleConfig = ModuleConfiguration("org.processing", DatabinderRepo) lazy val sjsonModuleConfig = ModuleConfiguration("net.debasishg", ScalaToolsRelRepo) @@ -78,7 +78,7 @@ class AkkaParentProject(info: ProjectInfo) extends DefaultProject(info) with Aut lazy val JACKSON_VERSION = "1.7.1" lazy val JERSEY_VERSION = "1.3" lazy val MULTIVERSE_VERSION = "0.6.2" - lazy val SCALATEST_VERSION = "1.4-SNAPSHOT" + lazy val SCALATEST_VERSION = "1.4.RC3" lazy val JETTY_VERSION = "7.4.0.v20110414" lazy val JAVAX_SERVLET_VERSION = "3.0" lazy val SLF4J_VERSION = "1.6.0" @@ -123,8 +123,8 @@ class AkkaParentProject(info: ProjectInfo) extends DefaultProject(info) with Aut lazy val protobuf = "com.google.protobuf" % "protobuf-java" % "2.3.0" % "compile" //New BSD - lazy val sjson = "net.debasishg" % "sjson_2.9.0.RC3" % "0.11" % "compile" //ApacheV2 - lazy val sjson_test = "net.debasishg" % "sjson_2.9.0.RC3" % "0.11" % "test" //ApacheV2 + lazy val sjson = "net.debasishg" %% "sjson" % "0.11" % "compile" //ApacheV2 + lazy val sjson_test = "net.debasishg" %% "sjson" % "0.11" % "test" //ApacheV2 lazy val slf4j = "org.slf4j" % "slf4j-api" % SLF4J_VERSION lazy val logback = "ch.qos.logback" % "logback-classic" % "0.9.28" % "runtime" @@ -138,7 +138,7 @@ class AkkaParentProject(info: ProjectInfo) extends DefaultProject(info) with Aut lazy val junit = "junit" % "junit" % "4.5" % "test" //Common Public License 1.0 lazy val mockito = "org.mockito" % "mockito-all" % "1.8.1" % "test" //MIT - lazy val scalatest = "org.scalatest" % "scalatest" % SCALATEST_VERSION % "test" //ApacheV2 + lazy val scalatest = "org.scalatest" %% "scalatest" % SCALATEST_VERSION % "test" //ApacheV2 } // ------------------------------------------------------------------------------------------------------------------- From aad5f67c6bcee66a83ad004eebd5f8a0c52027bc Mon Sep 17 00:00:00 2001 From: Peter Vlugter Date: Thu, 5 May 2011 13:13:49 +1200 Subject: [PATCH 3/5] Make akka parent project an actual parent project --- project/build/AkkaProject.scala | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/project/build/AkkaProject.scala b/project/build/AkkaProject.scala index f3fd2c19af..a5e0f44611 100644 --- a/project/build/AkkaProject.scala +++ b/project/build/AkkaProject.scala @@ -10,7 +10,7 @@ import sbt._ import sbt.CompileOrder._ import spde._ -class AkkaParentProject(info: ProjectInfo) extends DefaultProject(info) with AutoCompilerPlugins { +class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) { // ------------------------------------------------------------------------------------------------------------------- // Compile settings @@ -24,10 +24,6 @@ class AkkaParentProject(info: ProjectInfo) extends DefaultProject(info) with Aut val javaCompileSettings = Seq("-Xlint:unchecked") - override def compileOptions = super.compileOptions ++ scalaCompileSettings.map(CompileOption) - override def javaCompileOptions = super.javaCompileOptions ++ javaCompileSettings.map(JavaCompileOption) - override def consoleOptions = super.consoleOptions ++ compileOptions("-P:continuations:enable") - // ------------------------------------------------------------------------------------------------------------------- // All repositories *must* go here! See ModuleConigurations below. // ------------------------------------------------------------------------------------------------------------------- @@ -162,12 +158,6 @@ class AkkaParentProject(info: ProjectInfo) extends DefaultProject(info) with Aut override def disableCrossPaths = true - //Exclude slf4j1.5.11 from the classpath, it's conflicting... - override def fullClasspath(config: Configuration): PathFinder = { - super.fullClasspath(config) --- - (super.fullClasspath(config) ** "slf4j*1.5.11.jar") - } - // ------------------------------------------------------------ // Publishing // ------------------------------------------------------------ @@ -309,7 +299,7 @@ class AkkaParentProject(info: ProjectInfo) extends DefaultProject(info) with Aut } // ------------------------------------------------------------------------------------------------------------------- - // Examples + // Samples // ------------------------------------------------------------------------------------------------------------------- class AkkaSampleAntsProject(info: ProjectInfo) extends DefaultSpdeProject(info) { From 0ac0a1876c116f6324fc76abcb6f1f11e773ec33 Mon Sep 17 00:00:00 2001 From: Peter Vlugter Date: Thu, 5 May 2011 14:51:36 +1200 Subject: [PATCH 4/5] Generate combined scaladoc across subprojects --- project/build/AkkaProject.scala | 16 +++++++++----- project/build/DocParentProject.scala | 32 ++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 project/build/DocParentProject.scala diff --git a/project/build/AkkaProject.scala b/project/build/AkkaProject.scala index a5e0f44611..8c11ccb3d2 100644 --- a/project/build/AkkaProject.scala +++ b/project/build/AkkaProject.scala @@ -10,7 +10,7 @@ import sbt._ import sbt.CompileOrder._ import spde._ -class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) { +class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) with DocParentProject { // ------------------------------------------------------------------------------------------------------------------- // Compile settings @@ -158,9 +158,15 @@ class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) { override def disableCrossPaths = true - // ------------------------------------------------------------ + // ------------------------------------------------------------------------------------------------------------------- + // Scaladocs + // ------------------------------------------------------------------------------------------------------------------- + + override def docProjectDependencies = dependencies.toList - akka_samples + + // ------------------------------------------------------------------------------------------------------------------- // Publishing - // ------------------------------------------------------------ + // ------------------------------------------------------------------------------------------------------------------- override def managedStyle = ManagedStyle.Maven @@ -197,9 +203,9 @@ class AkkaParentProject(info: ProjectInfo) extends ParentProject(info) { override def deliverProjectDependencies = super.deliverProjectDependencies.toList - akka_samples.projectID - akka_tutorials.projectID - // ------------------------------------------------------------ + // ------------------------------------------------------------------------------------------------------------------- // Build release - // ------------------------------------------------------------ + // ------------------------------------------------------------------------------------------------------------------- val localReleasePath = outputPath / "release" / version.toString val localReleaseRepository = Resolver.file("Local Release", localReleasePath / "repository" asFile) diff --git a/project/build/DocParentProject.scala b/project/build/DocParentProject.scala new file mode 100644 index 0000000000..ebe339ab2f --- /dev/null +++ b/project/build/DocParentProject.scala @@ -0,0 +1,32 @@ +import sbt._ + +trait DocParentProject extends ParentProject { + def docOutputPath = outputPath / "doc" / "main" / "api" + + def docProjectDependencies = topologicalSort.dropRight(1) + + def docMainSources = + docProjectDependencies.map { + case sp: ScalaPaths => sp.mainSources + case _ => Path.emptyPathFinder + }.foldLeft(Path.emptyPathFinder)(_ +++ _) + + def docCompileClasspath = + docProjectDependencies.map { + case bsp: BasicScalaProject => bsp.compileClasspath + case _ => Path.emptyPathFinder + }.foldLeft(Path.emptyPathFinder)(_ +++ _) + + def docLabel = "main" + + def docMaxErrors = 100 + + def docOptions: Seq[String] = Seq.empty + + lazy val doc = docAction describedAs ("Create combined scaladoc for all subprojects") + + def docAction = task { + val scaladoc = new Scaladoc(docMaxErrors, buildCompiler) + scaladoc(docLabel, docMainSources.get, docCompileClasspath.get, docOutputPath, docOptions, log) + } +} From 8303c4545b542f0efd46dbbd9b616436614d3763 Mon Sep 17 00:00:00 2001 From: Peter Vlugter Date: Thu, 5 May 2011 15:20:22 +1200 Subject: [PATCH 5/5] Don't git ignore project/build --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 91c3a65819..5d4e21b9e6 100755 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ TAGS akka.tmproj reports dist -build target deploy/*.jar data