[slime-devel] Concurrent multiple slimes with different lisps

Peter Seibel peter at javamonkey.com
Tue Feb 17 22:55:38 UTC 2004


Since I constantly have to move between different Lisp impls to test
things out, I'm interested in running multiple SLIME at the same time
talking to different implementations. Anyway, as a first step toward
making this a bit more sane, here's a patch that changes the way SLIME
builds itself so each impl gets its own directory for its fasl files.
Or is there some other way I should be doing this?

-Peter


Index: swank-loader.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-loader.lisp,v
retrieving revision 1.16
diff -u -r1.16 swank-loader.lisp
--- swank-loader.lisp	5 Feb 2004 05:57:04 -0000	1.16
+++ swank-loader.lisp	17 Feb 2004 22:46:50 -0000
@@ -35,12 +35,27 @@
           #+clisp '("xref" "metering" "swank-clisp" "swank-gray")
           ))
 
+(defparameter *lisp-name*
+  #+cmu "cmu"
+  #+sbcl "sbcl"
+  #+openmcl "openmcl"
+  #+lispworks "lispworks"
+  #+allegro "allegro"
+  #+clisp "clisp")
+
+
 (defparameter *swank-pathname* (make-swank-pathname "swank"))
 
 (defun file-newer-p (new-file old-file)
   "Returns true if NEW-FILE is newer than OLD-FILE."
   (> (file-write-date new-file) (file-write-date old-file)))
 
+(defun binary-pathname (source-pathname)
+  (merge-pathnames
+   (make-pathname :directory `(:relative "fasl" ,*lisp-name*))
+   (merge-pathnames (compile-file-pathname source-pathname))))
+
+
 (defun compile-files-if-needed-serially (files)
   "Compile each file in FILES if the source is newer than
 its corresponding binary, or the file preceding it was 
@@ -48,14 +63,15 @@
   (with-compilation-unit ()
     (let ((needs-recompile nil))
       (dolist (source-pathname files)
-        (let ((binary-pathname (compile-file-pathname source-pathname)))
+        (let ((binary-pathname (binary-pathname source-pathname)))
           (handler-case
               (progn
                 (when (or needs-recompile
                           (not (probe-file binary-pathname))
                           (file-newer-p source-pathname binary-pathname))
                   (format t "~&;; Compiling ~A...~%" source-pathname)
-                  (compile-file source-pathname)
+                  (ensure-directories-exist binary-pathname)
+                  (compile-file source-pathname :output-file binary-pathname)
                   (setq needs-recompile t))
                 (load binary-pathname))
             #+(or)

-- 
Peter Seibel                                      peter at javamonkey.com

         Lisp is the red pill. -- John Fraser, comp.lang.lisp





More information about the slime-devel mailing list