[slime-devel] optional asdf integration: error when asdf is not available

Anton Vodonosov avodonosov at yandex.ru
Sat Oct 16 03:50:49 UTC 2010


Hello.

In the current head, SBCL 1.0.43.13 fails on swank-loader.lisp, when ASDF is not afailable.

The reason is that (find-symbol "COMPILE-FILE-PATHNAME*" :asdf) signalls error "Unknown package :asdf).

Another error is loading contrib swank-asdf by presense of SBCL or ECL:
    #+(or asdf sbcl ecl) swank-asdf

Even if SBCL is boundled with ASDF (which is not always the case), the feature :asdf will be afailable, 
and therefore it's sufficient to just have:
    #+asdf swank-asdf

The patch is below.

Best regards,
- Anton

Index: swank-loader.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-loader.lisp,v
retrieving revision 1.107
diff -U 5 -r1.107 swank-loader.lisp
--- swank-loader.lisp   15 Oct 2010 22:53:45 -0000      1.107
+++ swank-loader.lisp   16 Oct 2010 03:45:13 -0000
@@ -124,11 +124,12 @@
     (and s (symbol-name (read s)))))

 (defun default-fasl-dir ()
   (or
    ;; If ASDF is available then store Slime's fasl's where ASDF stores them.
-   (let ((translate-fn (find-symbol "COMPILE-FILE-PATHNAME*" :asdf)))
+   (let ((translate-fn (and (find-package :asdf)
+                            (find-symbol "COMPILE-FILE-PATHNAME*" :asdf))))
      (when translate-fn
        (make-pathname
         :name nil :type nil
         :defaults (funcall translate-fn
                            (make-pathname :name "foo"
@@ -224,11 +225,11 @@

 (defvar *contribs*
   '(swank-c-p-c swank-arglists swank-fuzzy
     swank-fancy-inspector
     swank-presentations swank-presentation-streams
-    #+(or asdf sbcl ecl) swank-asdf
+    #+asdf swank-asdf
     swank-package-fu
     swank-hyperdoc
     #+sbcl swank-sbcl-exts
     )
   "List of names for contrib modules.")




More information about the slime-devel mailing list