Closed dto closed 8 years ago
I should note that I am building this on the host Android system using the ECL byte-compiler.
wildcard
is a condition
, but not a subclass of error
which is in tern a subclass of serious-condition
.
I mean the compilation should not stop here because it can be simply ignored. I suspect ECLAndroid-specific bug.
Or, ensure that *break-on-signals*
is set to NIL
. This is a flag mainly used for debugging, which forces the implementation to enter the debugger capturing any conditions, rather than ignoring non-serious conditions. This should be set to NIL in deployment. http://clhs.lisp.se/Body/v_break_.htm
new (progn (signal 'wildcard)) fix
The error actually related to this fix is not wildcard
, although yes, I mechanically grep'ed all signal
into (progn (signal ...))
. Sorry for my confusing fix.
The related code is a condition named deferred
,
https://github.com/guicho271828/trivia/blob/master/level2/impl.lisp#L328
which is signaled here, https://github.com/guicho271828/trivia/blob/master/level2/impl.lisp#L368
and handled here, https://github.com/guicho271828/trivia/blob/master/level2/impl.lisp#L348
and the error should be slot-unbound
, not wildcard
.
https://gitlab.com/embeddable-common-lisp/ecl/issues/247
hi, break-on-signals is bound to Nil at the top level (not sure if ASDF is doing any rebinding, though)
could you find a macroexpansion of restart-case form? also, what happens if you evaluate (define-condition mycond () ()) (signal 'mycond)
on ECLAndroid ?
CL-USER> (define-condition mycond () ()) (signal 'mycond) ; Evaluation aborted on #.
Which restart-case form are you asking me to macroexpand?
Here is the macroexpansion of the restart-case from impl.lisp:29
(BLOCK #:G252
(LET ((#:G253 NIL))
(TAGBODY
(RESTART-BIND
((CONTINUE
#'(LAMBDA (&REST SI::TEMP) (SETQ #:G253 SI::TEMP) (GO #:G254))))
(RETURN-FROM #:G252 (PROGN (SIGNAL 'WILDCARD))))
#:G254
(RETURN-FROM #:G252 (APPLY #'(LAMBDA ()) #:G253)))))
CL-USER> (define-condition mycond () ()) (signal 'mycond) ; Evaluation aborted on #.
Does this mean it entered the debugger? If so, this should not happen in a conforming inplementation. signal
should return NIL.
For example,
CL-USER> (define-condition mycond () ())
MYCOND
CL-USER> (signal 'mycond)
NIL
CL-USER> (lisp-implementation-type)
"SBCL"
CL-USER> (lisp-implementation-version)
"1.3.5"
Attempting to macroexpand the one on line 366 causes an error: (:emacs-rex (swank:swank-macroexpand-1 nil) ":trivia.level2.impl" t 5) (:return (:abort "#")
My fix was for the bug of restart-case
. However, your case revealed that AndroECL's signal
is broken. These are two independent bugs in ECL.
I am doing another check to make sure my own handler-case around (start-swank) wasn't causing an issue
okay
its 2 am and I am dead sleepy. sorry I will reply tomorrow
Ok, the problem was my own HANDLER-CASE. I was catching CONDITION when i really should have been catching ERROR. Trivia now compiles/loads without trouble. INLINED-GENERIC-FUNCTION also loads now, and I"ll be testing it out. sorry for the trouble.
Using git head Trivia on ECL-Android with the new (progn (signal 'wildcard)) fix, but behavior is unchanged and still signals during compilation.
(asdf:load-system :trivia) ......... ......... ;;; Compiling input stream /data/data/org.lisp.ecl/app_resources/home/quicklisp/local-projects/trivia/level2/derived3.lisp
[Condition of type TRIVIA.LEVEL2.IMPL::WILDCARD]