# HG changeset patch # Parent 86dc9ccc54f91772e5cad015b930a327c4f8afc7 Initial patches to get chemicalambda to work. Declare dependency on org.armedbear.lisp:abcl:1.0.0 or better. Correct ASDF description to refer to Akka via MVN coordiate, but the Maven artifact directly on the filesystem. Move Java source to standard location where Maven can build it. Start to refactor Java Akka classes. diff --git a/.hgignore b/.hgignore new file mode 100644 --- /dev/null +++ b/.hgignore @@ -0,0 +1,2 @@ +.hgignore +target diff --git a/chemicalambda.asd b/chemicalambda.asd --- a/chemicalambda.asd +++ b/chemicalambda.asd @@ -1,21 +1,23 @@ ;;;; chemicalambda.asd +#+abcl (eval-when (:compile-toplevel :load-toplevel :execute) - (cl:require 'abcl-contrib) - (cl:require 'abcl-asdf) - (cl:require 'extensible-sequences) - (cl:require 'java-collections) - (require :abcl-contrib) - (require :jfli)) + (loop :for requirable :in '(:abcl-contrib :extensible-sequences :java-collections) + :doing (require requirable))) (asdf:defsystem #:chemicalambda :name "chemicalambda" :serial t :license "Apache License Version 2.0" + :desystem-depends-on (:abcl-asdf :jfli) :depends-on (#:alexandria #:optima) :default-component-class asdf:cl-source-file - :components - ((:mvn "com.typesafe.akka/akka" :version "2.2") - (:file "package") - (:file "utilities") - (:file "chemicalambda"))) + :components ((:module akka + :components ((:mvn "com.typesafe.akka/akka/2.2"))) + (:module source :pathname "" + :components ((:file "package") + (:file "utilities") + (:file "chemicalambda"))) + (:module chemicalambda.jar :pathname "target/" + :components ((:jar-file "chemicalambda-0.1"))))) + diff --git a/pom.xml b/pom.xml --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.armedbear.lisp abcl - 0.25.0 + [1.0.0,) diff --git a/src/main/java/org/abcl/akka/AkkaActorUntyped.java b/src/main/java/org/abcl/akka/AkkaActorUntyped.java new file mode 100644 --- /dev/null +++ b/src/main/java/org/abcl/akka/AkkaActorUntyped.java @@ -0,0 +1,8 @@ +package org.abcl.akka; + +import akka.actor.Props; + +public interface AkkaActorUntyped { + // marker type for implementors of AkkaActor + public Props mkProps(String name); +} diff --git a/AkkaApi.java b/src/main/java/org/abcl/akka/AkkaApi.java rename from AkkaApi.java rename to src/main/java/org/abcl/akka/AkkaApi.java --- a/AkkaApi.java +++ b/src/main/java/org/abcl/akka/AkkaApi.java @@ -1,3 +1,5 @@ +package org.abcl.akka; + import java.util.Map; import org.armedbear.lisp.JavaObject; @@ -8,7 +10,6 @@ import akka.event.Logging; import akka.event.LoggingAdapter; import akka.actor.Props; -import akka.japi.Creator; import akka.actor.ActorSystem; public class AkkaApi { @@ -23,7 +24,6 @@ ActorRef toReturn = system.actorOf(Props.create(AkkaActorUntyped.class)); return toReturn; } -} class AkkaActorUntyped extends UntypedActor { protected Class objectType; @@ -70,5 +70,6 @@ protected Object createInstance() throws Exception { return closure.execute(JavaObject.getInstance(this)).javaInstance(); } + } } diff --git a/AkkaApiSimple.java b/src/main/java/org/abcl/akka/AkkaApiSimple.java rename from AkkaApiSimple.java rename to src/main/java/org/abcl/akka/AkkaApiSimple.java --- a/AkkaApiSimple.java +++ b/src/main/java/org/abcl/akka/AkkaApiSimple.java @@ -1,3 +1,5 @@ +package org.abcl.akka; + import java.util.Map; import org.armedbear.lisp.JavaObject; @@ -8,10 +10,8 @@ import akka.event.Logging; import akka.event.LoggingAdapter; import akka.actor.Props; -import akka.japi.Creator; import akka.actor.ActorSystem; - public class AkkaApiSimple { public static void main(String[] args) { @@ -27,10 +27,9 @@ AkkaSingleton.stop(); System.out.println("< AkkaApiSimple.test"); } - } -class AkkaActorUntyped extends UntypedActor { +class AkkaActorUntypedApiSimple extends UntypedActor { protected Class objectType; protected LispObject closure; protected Map dependencies; @@ -100,6 +99,6 @@ public static ActorRef createActor() { AkkaSingleton as = getInstance(); - return as.system.actorOf(AkkaActorUntyped.mkProps()); + return as.system.actorOf(AkkaActorUntypedApiSimple.mkProps()); } }