I suspect this question/issue is already addressed in SLIME documentation (where?) or has been touched on in a mailing list before but... Google and a search of the archives via gmane have let me down so... apologies up front.
In short, how does one suppress compiler error warnings in the SLIME REPL (I'm using SLIME with SBCL)? This issue arose in the context of a program which generates thousands of compiler error conditions (intentionally) as it evaluates a large collection of sexps. (As one might imagine), execution is slowed down substantially by the verbosity that accompanies these error messages when each message much be sent to the terminal. Even with a handler in place, SBCL still likes to let everyone know a compiler error has occurred so I end up with thousands of lines in the REPL along the lines of:
; in: LAMBDA NIL ; ((KNOT) ((D1))) ; ; caught ERROR: ; illegal function call
Setting *error-output* or *standard-output* to (make-broadcast-stream) is the minimal-effort fix under SBCL if it is used in a regular terminal (e.g., xterm) but, in the context of SLIME, these settings seem to be ignored. SLIME seems to globally redirect streams to the REPL (as the SLIME manual suggests) regardless of *error-output* and/or *standard-output* settings. Is there any way to override this behavior and suppress/divert such error messages? (something related to swank::*globally-redirect-io*?)
Thanks for your good graces and any suggestions,
- Alan
On May 18, 2006, at 7:14 PM, David A Thompson wrote:
In short, how does one suppress compiler error warnings in the SLIME REPL (I'm using SLIME with SBCL)? This issue arose in the context of a program which
You might try: (declaim (sb-ext:muffle-conditions sb-ext:compiler-note))
As described in: http://sourceforge.net/mailarchive/message.php?msg_id=14321360
best, -Hazen
hbabcockos1@mac.com writes:
You might try: (declaim (sb-ext:muffle-conditions sb-ext:compiler-note))
Unfortunately the messages he describes are from ERRORs, which cannot be muffled.
If you call COMPILE-FILE yourself, then the old
(let ((*error-output* (make-broadcase-stream))) (compile-file "foo.lisp" :print nil))
should work perfecctly. No room for slime to snarf the stream there.
Cheers,
-- Nikodemus Schemer: "Buddha is small, clean, and serious." Lispnik: "Buddha is big, has hairy armpits, and laughs."
Quoting Nikodemus Siivola nikodemus@random-state.net:
hbabcockos1@mac.com writes:
You might try: (declaim (sb-ext:muffle-conditions sb-ext:compiler-note))
Unfortunately the messages he describes are from ERRORs, which cannot be muffled.
If you call COMPILE-FILE yourself, then the old
(let ((*error-output* (make-broadcase-stream))) (compile-file "foo.lisp" :print nil))
should work perfecctly. No room for slime to snarf the stream there.
Thanks! The limited muffling ability of SBCL was indeed a problem...
CL-USER> (locally (declare (sb-ext:muffle-conditions sb-ext:compiler-note style-warning error)) (eval '(KSAND ((((KDWT) (KSOR))) D1 KSOR) KNOT))) ; in: LAMBDA NIL ; ((((KDWT) (KSOR))) D1 KSOR) ; ; caught ERROR: ; illegal function call ; ; compilation unit finished ; caught 1 ERROR condition ; Evaluation aborted CL-USER> (let ((*error-output* (make-broadcast-stream))) (eval '(KSAND ((((KDWT) (KSOR))) D1 KSOR) KNOT))) ; Evaluation aborted CL-USER>
---------------------------------------------------------------- This email was scanned for viruses, FPU