compile and compile-file now use the CLCS for their diagnostics.
there is even some docs, see
<
http://clisp.podval.org/impnotes/compilation.html#compile-errors>.
it looks decent so far (please do get cvs head and try it yourself):
[6]> (compile-file "../../bugs/c-error")
;; Compiling file /home/sds/src/clisp/bugs/c-error.lisp ...
** - Continuable Error
in F in line 1 : Code contains dotted list (BLOCK F . X)
If you continue (by typing 'continue'): Ignore the error and proceed
The following restarts are also available:
ABORT :R1 Abort main loop
Break 1 [7]> :c
WARNING: in F in line 1 : variable X is not used.
Misspelled or missing IGNORE declaration?
** - Continuable Error
in C in lines 3..7 : CASE: the T clause must be the last one:
(CASE X (1 2) (T 4) (5 6))
If you continue (by typing 'continue'): Ignore the error and proceed
The following restarts are also available:
ABORT :R1 Abort main loop
Break 1 [8]> :c
** - Continuable Error
in H in lines 9..11 : Illegal syntax in LET/LET*: (A A A)
If you continue (by typing 'continue'): Ignore the error and proceed
The following restarts are also available:
ABORT :R1 Abort main loop
Break 1 [9]> :c
;; Deleted file /home/sds/src/clisp/bugs/c-error.fas
There were errors in the following functions:
F C H
3 errors, 1 warning
NIL ;
4 ;
3
[10]>
so you can examine errors are they are signaled.
except for one unpleasant glitch:
compile errors are signaled as continuable errors (so that on can
"ignore and proceed" to deal with the problem later) of type
source-program-error (so that some error context is available
programmatically), but this means that "clisp -c" which uses
appease-cerrors, will report errors as warnings:
$ ./clisp -q -norc -c ../../bugs/c-error.lisp
STACK size: 98206 [0xb7cfcf00 0xb7c9d088]
;; Compiling file /home/sds/src/clisp/bugs/c-error.lisp ...
WARNING: in F in line 1 : Code contains dotted list (BLOCK F . X)
Ignore the error and proceed
WARNING: in F in line 1 : variable X is not used.
Misspelled or missing IGNORE declaration?
WARNING: in C in lines 3..7 : CASE: the T clause must be the last one:
(CASE X (1 2) (T 4) (5 6))
Ignore the error and proceed
WARNING: in H in lines 9..11 : Illegal syntax in LET/LET*: (A A A)
Ignore the error and proceed
;; Deleted file /home/sds/src/clisp/bugs/c-error.fas
There were errors in the following functions:
F C H
3 errors, 1 warning
what do I do about this?
-- nothing: the "Ignore the error and proceed" is a sufficient indicator
that this is actually an error
-- replace appease-cerrors with something compile-file-specific, which
will print a more explicit message
-- remove appease-cerrors and just fail the whole file on the first error.
opinions?
patches?
--
Sam Steingold (
http://sds.podval.org/) on Ubuntu 9.04 (jaunty)
http://ffii.org http://camera.org http://jihadwatch.org http://truepeace.orghttp://openvotingconsortium.org http://iris.org.il http://www.memritv.orgTakeoffs are optional. Landings are mandatory.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference_______________________________________________
clisp-devel mailing list
clisp-devel@...
https://lists.sourceforge.net/lists/listinfo/clisp-devel