[slime-devel] Problem loading the ASDF swank with cl-launch and sbcl-0.9.9.1
Luca Capello
luca at pca.it
Mon Mar 27 20:58:05 UTC 2006
Hello!
On Fri, 17 Mar 2006 22:14:07 +0100, Luca Capello wrote:
> I should say that after some tests I think it's a SLIME problem.
>
> The Debian swank.asd [1] is heavily modified to bypass the load of
> swank-loader.lisp. And just rewriting the original swank.asd with
> the Debian one solves my problem :-)
Ok, the root cause of the problem is that cl-launch wants to save the
fasl files in a different folder than the default ~/.slime.
Here some more output:
=====
gismo at soren:~$ cl-launch -x -l sbcl -i "(push \"/home/gismo/systems/\" asdf:*central-registry*) (asdf:oos 'asdf:load-op 'swank)" --
; loading system definition from /home/gismo/systems/swank.asd into
; #<PACKAGE "ASDF824">
; registering #<SYSTEM :SWANK {B164741}> as SWANK
*load-pathname*:
|#P"/home/gismo/.cache/lisp-fasl/sbcl-0.9.9.11-linux-x86/home/gismo/libs/slime-cvs/swank-loader.fasl"|
*default-pathname-defaults*:
|#P"/home/gismo/"|
*source-directory*:
|#P"/home/gismo/.cache/lisp-fasl/sbcl-0.9.9.11-linux-x86/home/gismo/libs/slime-cvs/"|
=====
Thanks to Marco Baringer, I found a way to solve this problem:
--8<---------------cut here---------------start------------->8---
Index: swank-loader.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-loader.lisp,v
retrieving revision 1.58
diff -u -r1.58 swank-loader.lisp
--- swank-loader.lisp 16 Mar 2006 17:26:27 -0000 1.58
+++ swank-loader.lisp 27 Mar 2006 20:13:54 -0000
@@ -29,7 +29,9 @@
(defvar *source-directory*
(make-pathname :name nil :type nil
- :defaults (or *load-pathname* *default-pathname-defaults*))
+ :defaults (truename
+ (asdf:component-pathname
+ (asdf:find-system :swank))))
"The directory where to look for the source.")
(defparameter *sysdep-files*
--8<---------------cut here---------------end--------------->8---
With this patch, cl-launch can load the swank and the fasl are saved
as the following:
- swank-loader.fasl in the cl-launch ~/.cache
- all the others fasl in ~/.slime, as usual
BTW, the same error is present with the common-lisp-controller on a
Debian unstable system:
=====
luca at gismo:~/Hacking$ sbcl --eval "(asdf:oos 'asdf:load-op 'swank)"
[...]
; loading system definition from
/usr/share/common-lisp/systems/swank.asd into
[...]
; /var/cache/common-lisp-controller/1000/sbcl/slime/swank-loader.fasl
written
; compilation finished in 0:00:01
*load-pathname*:
|#P"/var/cache/common-lisp-controller/1000/sbcl/slime/swank-loader.fasl"|
*default-pathname-defaults*:
|#P"/home/luca/Hacking/"|
*source-directory*:
|#P"/var/cache/common-lisp-controller/1000/sbcl/slime/"|
=====
With the above patch, the problem is solved and the upstream swank.asd
can be used in conjunction with the following patch (from [2]):
--8<---------------cut here---------------start------------->8---
Index: swank-loader.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-loader.lisp,v
retrieving revision 1.58
diff -u -r1.58 swank-loader.lisp
--- swank-loader.lisp 16 Mar 2006 17:26:27 -0000 1.58
+++ swank-loader.lisp 27 Mar 2006 20:42:54 -0000
@@ -129,9 +131,18 @@
(defun binary-pathname (source-pathname binary-directory)
"Return the pathname where SOURCE-PATHNAME's binary should be
compiled."
(let ((cfp (compile-file-pathname source-pathname)))
+ #-common-lisp-controller
(merge-pathnames (make-pathname :name (pathname-name cfp)
:type (pathname-type cfp))
- binary-directory)))
+ binary-directory)
+ #+common-lisp-controller
+ (merge-pathnames (make-pathname
+ :directory
+ `(:relative "swank" "fasl" ,(unique-directory-name))
+ :name (pathname-name cfp)
+ :type (pathname-type cfp))
+ (clc:calculate-fasl-root))
+ ))
(defun compile-files-if-needed-serially (files fasl-directory)
"Compile each file in FILES if the source is newer than
--8<---------------cut here---------------end--------------->8---
BTW, I'm aware of the correct way to customize the source- and
fasl-directory :-)
Any comments?
Thx, bye,
Gismo / Luca
[2] http://cl-debian.alioth.debian.org/repository/pvaneynd/slime/swank-loader.lisp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20060327/587e66bd/attachment.sig>
More information about the slime-devel
mailing list