Greetings,
Attempting to (require 'swank) twice in the same lisp image causes an
error on (at least) SBCL-1.0.15 with asdf-binary-locations enabled. [1]
The error is triggered when asdf:load-op [2] goes looking for
swank-loader.fasl/swank-loader.lisp in the fasls directory (which,
because of asdf-binary-locations, won't be the same directory that
contained the source swank-loader.lisp). The "make compile-op a nop"
stuff in swank.asd, however, makes sure that a swank-loader.fasl file
will never get generated.
This error occurs on the latest CVS but does not occur on swank CVS
circa 2008-01-31.
The attached patch corrects the issue by allowing swank-loader.fasl to
be generated. This seems like the best solution to me, but I'm not
familiar with the impact of this on other implementations.
Cheers,
-- Travis
[1] Why is this important? I often have swank preloaded in my lisp
image. If I then try to load a system that depends on swank, this error
is triggered and prevents the system from loading.
[2] actually, the method asdf:operation-done-p ((o asdf:load-op) ...)
# sbcl --eval "(require 'swank)"
; loading #P"/root/.slime/fasl/sbcl-1.0.15-gentoo-linux-x86-64/swank-backend.fasl"
; loading #P"/root/.slime/fasl/sbcl-1.0.15-gentoo-linux-x86-64/swank-source-path-parser.fasl"
; loading #P"/root/.slime/fasl/sbcl-1.0.15-gentoo-linux-x86-64/swank-source-file-cache.fasl"
; loading #P"/root/.slime/fasl/sbcl-1.0.15-gentoo-linux-x86-64/swank-sbcl.fasl"
; loading #P"/root/.slime/fasl/sbcl-1.0.15-gentoo-linux-x86-64/swank-gray.fasl"
; loading #P"/root/.slime/fasl/sbcl-1.0.15-gentoo-linux-x86-64/swank.fasl"
WARNING: These Swank interfaces are unimplemented:
(CALLS-WHO DISASSEMBLE-FRAME SLDB-BREAK-AT-START SLDB-BREAK-ON-RETURN
WHO-SPECIALIZES)
* (require 'swank)
debugger invoked on a SB-POSIX::FILE-ENOENT in thread #<THREAD "initial thread" {10026B6BC1}>:
failed to find the WRITE-DATE of /var/lib/common-lisp/fasls/root/sbcl-1.0.15-gentoo-linux-x86-64/usr/share/common-lisp/source/swank/swank-loader.lisp:
No such file or directory
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit debugger, returning to top level.
(SB-IMPL::SIMPLE-FILE-PERROR
"failed to find the WRITE-DATE of ~A"
#P"/var/lib/common-lisp/fasls/root/sbcl-1.0.15-gentoo-linux-x86-64/usr/share/common-lisp/source/swank/swank-loader.lisp"
2)
0] BACKTRACE
0: (SB-IMPL::SIMPLE-FILE-PERROR
"failed to find the WRITE-DATE of ~A"
#P"/var/lib/common-lisp/fasls/root/sbcl-1.0.15-gentoo-linux-x86-64/usr/share/common-lisp/source/swank/swank-loader.lisp"
2)
1: (SB-IMPL::SIMPLE-FILE-PERROR
"failed to find the WRITE-DATE of ~A"
#P"/var/lib/common-lisp/fasls/root/sbcl-1.0.15-gentoo-linux-x86-64/usr/share/common-lisp/source/swank/swank-loader.lisp"
2)[:EXTERNAL]
2: (SB-IMPL::QUERY-FILE-SYSTEM
#P"/var/lib/common-lisp/fasls/root/sbcl-1.0.15-gentoo-linux-x86-64/usr/share/common-lisp/source/swank/swank-loader.lisp"
:WRITE-DATE
T)
3: (FILE-WRITE-DATE
#P"/var/lib/common-lisp/fasls/root/sbcl-1.0.15-gentoo-linux-x86-64/usr/share/common-lisp/source/swank/swank-loader.lisp")
4: ((FLET ASDF::FWD-OR-RETURN-T)
#P"/var/lib/common-lisp/fasls/root/sbcl-1.0.15-gentoo-linux-x86-64/usr/share/common-lisp/source/swank/swank-loader.lisp")
5: ((SB-PCL::FAST-METHOD ASDF:OPERATION-DONE-P (ASDF:OPERATION ASDF:COMPONENT))
#<unavailable argument>
#<unavailable argument>
#<ASDF:LOAD-OP NIL {1002EDB501}>
#<SWANK-LOADER::SWANK-LOADER-FILE "swank-loader" {1002ABBA21}>)
6: ((SB-PCL::FAST-METHOD ASDF::TRAVERSE (ASDF:OPERATION ASDF:COMPONENT))
#(3 NIL)
#<unavailable argument>
#<ASDF:LOAD-OP NIL {1002EDB501}>
#<SWANK-LOADER::SWANK-LOADER-FILE "swank-loader" {1002ABBA21}>)
7: ((SB-PCL::FAST-METHOD ASDF::TRAVERSE (ASDF:OPERATION ASDF:COMPONENT))
#(3 NIL)
#<unavailable argument>
#<ASDF:LOAD-OP NIL {1002EDB501}>
#<ASDF:SYSTEM "swank" {1002A87861}>)
8: (ASDF:OPERATE ASDF:LOAD-OP SWANK)[:EXTERNAL]
9: (ASDF::MODULE-PROVIDE-ASDF SWANK)
10: ((LAMBDA (#:G[REQUIRE]18)) ASDF::MODULE-PROVIDE-ASDF)
11: (SB-IMPL::%MAP-FOR-EFFECT-ARITY-1
#<CLOSURE (LAMBDA #) {1002ED86E9}>
(ASDF::MODULE-PROVIDE-ASDF SB-IMPL::MODULE-PROVIDE-CONTRIB))
12: (REQUIRE SWANK NIL)
13: (SB-INT:SIMPLE-EVAL-IN-LEXENV (REQUIRE 'SWANK) #<NULL-LEXENV>)
14: (INTERACTIVE-EVAL (REQUIRE 'SWANK))
15: (SB-IMPL::REPL-FUN NIL)
16: (SB-IMPL::REPL-FUN NIL)[:EXTERNAL]
17: ((LAMBDA ()))
18: ((LAMBDA ()))[:EXTERNAL]
19: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (LAMBDA #) {1002ED7F19}>)
20: (SB-IMPL::TOPLEVEL-REPL NIL)
21: (SB-IMPL::TOPLEVEL-INIT)
22: ((LABELS SB-IMPL::RESTART-LISP))
0]
diff --git a/swank.asd b/swank.asd
index 814f41c..6076d28 100644
--- a/swank.asd
+++ b/swank.asd
@@ -26,17 +26,6 @@
(defclass swank-loader-file (asdf:cl-source-file) ())
-;;;; make compile-op a nop
-
-(defmethod asdf:output-files ((o asdf:compile-op) (f swank-loader-file))
- (list (asdf:component-pathname f)))
-
-(defmethod asdf:perform ((o asdf:compile-op) (f swank-loader-file))
- t)
-
-(defmethod asdf:operation-done-p ((o asdf:compile-op) (f swank-loader-file))
- t)
-
;;;; after loading run init
(defmethod asdf:perform ((o asdf:load-op) (f swank-loader-file))