[slime-devel] ABCL reversion in 2008-12-30 (Re: Compilation output goes to *inferior-lisp* buffer under ABCL)
Mark Evenson
evenson at panix.com
Mon Feb 2 14:56:18 UTC 2009
ABCL is still having problems with SLIME HEAD. Here are some additional
notes on what I have so far figured out.
1. The following kludgy fix can be placed in 'slime-init.lisp'. After
the SLIME REPL has appeared, issue (SWANK::PATCH) to restore the streams
to their "proper values".
(in-package :swank)
(defvar *borked-connections* (make-hash-table))
(defun patch ()
(if (gethash *emacs-connection* *borked-connections*)
(warn "~A is already recorded as patched." *emacs-connection*)
(setf (gethash *emacs-connection* *borked-connections*)
*emacs-connection*))
(format *standard-output* "Fixing *STANDARD-OUTPUT*.~%")
(let ((env (connection.env *emacs-connection*)))
(loop :for (var . val) :in env
:do (setf (symbol-value var) val)))
(format *standard-output* "Fixed *STANDARD-OUTPUT*.~%"))
2. If one starts ABCL on the command line, loading swank via ASDF then
issuing a (SWANK:CREATE-SERVER), one can connect via Emacs M-X
slime-connection without any of the problems with the streams.
3. As far as I can track down the error, it seems that something in
ABCL dies in the WITH-IO-REDIRECTION macro. If one patches 'swank.lisp'
as in the attached patch, one observes that WITH-IO-REDIRECTION is
entered twice, but only exited once. Why this doesn't toatlly bork the
ABCL interaction still confused me. If one uncomments the HANDLER-CASE
in the patch, one gets an inexplicable and unintelligible death of the
ABCL process. Because connecting to ABCL running Swank not under Emacs
(see point #2 above) works fine, getting the actual stack trace from the
JVM doesn't look possible.
Tobias Rittweiler suggested on #lisp that it might be easier to fix
ABCL's use of the threaded Swank interfaces rather than trying to get
the NIL communication style to work. I'm working on that, but there is
almost certainly a bug in ABCL showing up here (somehow losing the
OUTPUT-FUNCTION in the closure over the WITH-CONNECTION macro is my
current guess) that should be addressed as well somehow.
Mark <evenson at panix.com>
--
"A screaming comes across the sky. It has happened before, but there is
nothing to compare to it now."
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: swank.lisp-abcl-debug.diff
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20090202/6c8aa735/attachment.ksh>
More information about the slime-devel
mailing list