Hi,
when I compile a buffer using C-c C-k and the source triggers a read error, I get thrown into sldb which shows something like this:
Error in function LISP::FOP-EVAL-FOR-EFFECT: Attempt to load a file having a compile-time read error. [Condition of type SIMPLE-ERROR]
Restarts: 0: [CONTINUE] Skip this form. 1: [CONTINUE] Return NIL from load of #p"/home/gefla/src/macho-0.4/src/message.x86f". 2: [ABORT] Abort SLIME compilation. 3: [ABORT] Abort handling SLIME request. 4: [ABORT] Return to Top-Level.
Backtrace: 0: (LISP::FOP-EVAL-FOR-EFFECT) 1: (LISP::LOAD-GROUP #<Stream for file "/home/gefla/src/macho-0.4/src/message.x86f">) 2: (LISP::FASLOAD #<Stream for file "/home/gefla/src/macho-0.4/src/message.x86f">) 3: (LISP::INTERNAL-LOAD #p"/home/gefla/src/macho-0.4/src/message.x86f" #p"/home/gefla/src/macho-0.4/src/message.x86f" :ERROR :BINARY) 4: (LISP::INTERNAL-LOAD #p"/home/gefla/src/macho-0.4/src/message.x86f" #p"/home/gefla/src/macho-0.4/src/message.x86f" :ERROR NIL) 5: (LOAD #p"/home/gefla/src/macho-0.4/src/message.x86f" :VERBOSE T :PRINT ...) 6: (COMPILE-FILE "/home/gefla/src/macho-0.4/src/message.lisp" :OUTPUT-FILE T :ERROR-FILE ...) 7: ("DEFIMPLEMENTATION SWANK-COMPILE-FILE") [...]
.. which is not too helpful. Pressing 'v' to view the source location shows the source for fop-eval-for-effect, which is not exactly where I wanted to go. The real error is buried in the REPL buffer.
; Compiling DEFUN PARSE-MIME-HEADER: ;
; Error: Read error at 7442: ; "(or (net.telent.date:parse-time/\ (cadr (split ";\s*" received)))" ; Reader error at 7476 on #<Stream for file "/home/gefla/src/macho-0.4/src/message.lisp">: ; package "NET.TELENT.DATE" not found ;
Did I misconfigure something or are read errors not handled in a sane way yet?
Goodbyte, Gerd.
Gerd Flaig gerd@schlund.de writes:
Hi,
when I compile a buffer using C-c C-k and the source triggers a read error, I get thrown into sldb which shows something like this:
[...]
Did I misconfigure something or are read errors not handled in a sane way yet?
There are a few yucky cases where the compiler enters the debugger when we don't want it to. :-(
The good news is that if you choose a restart to abort the compilation (usually press 'a' for abort) then the real error message should be presented to you.
-Luke
Luke Gorrie luke@synap.se writes:
The good news is that if you choose a restart to abort the compilation (usually press 'a' for abort) then the real error message should be presented to you.
ah.. works, thank you. Jumping to the source ('v') doesn't work, though. I wonder why compiler conditions haven't been standardized yet.
Goodbyte, Gerd.
P.S.: Have fun at the EUC.
Gerd Flaig gerd@schlund.de writes:
Luke Gorrie luke@synap.se writes:
The good news is that if you choose a restart to abort the compilation (usually press 'a' for abort) then the real error message should be presented to you.
ah.. works, thank you. Jumping to the source ('v') doesn't work, though.
I tried to fix that once but IIRC it was a bit tricky to recognise reader-errors and extract their file/position information from SLIME. Probably not very hard though.
P.S.: Have fun at the EUC.
Thanks, I'm sure I will! This year's Erlang conference is nicely organised/sponsored: the 20 euro registration fee includes dinner & drinks worth more than 20 euros. Probably have most of Stockholm in attendance :-)
P.S., apologies to Stockholm Lispers that I dropped the ball with organising the pub night (frankly I suck at this type of thing). But soon!
Cheers, Luke