Execution of a form compiled with errors.
vkulikov opened this issue · 2 comments
Hi!
When i try to eval next code
(defparameter doc1
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
<html>
<head>
<title>[#ABC-1132] New print function - Media ABC</title>
</head>
<body id=\"jira\" class=\"nl type-ab stalker\">
<div class=\"testc\">
<div>1</div>
<div>2</div>
</div>
</body>
</html>")
(defparameter tpl1
'(<div ((class "testc"))
(all ?lines
(div nil ?v))))
(chtml-matcher:match-template tpl1 doc1)
i get
Execution of a form compiled with errors. Form: # Compile-time error: Objects of type FUNCTION can't be dumped into fasl files. [Condition of type SB-INT:COMPILED-PROGRAM-ERROR] Restarts: 0: [RETRY] Retry SLIME REPL evaluation request. 1: [*ABORT] Return to SLIME's top level. 2: [ABORT] Abort thread (#) Backtrace: 0: (CHTML-MATCHER:SET-BINDING :V # #) 1: (CHTML-MATCHER:MAKE-BINDINGS ?V "1") 2: ((LAMBDA (CHTML-MATCHER::STATE) :IN CHTML-MATCHER::TGEN-MATCH-VAR) #) 3: (CHTML-MATCHER::MAP-CHILD-BINDINGS # # (#)) 4: ((LAMBDA (CHTML-MATCHER::STATE) :IN CHTML-MATCHER::TGEN-MERGE-CHILDREN) #)
Also, when try to recompile
(defun set-binding (var value dict)
(assoc-setf (bindings dict) (clean-var var) value))
get:
cd /home/vitaliy/quicklisp/dists/quicklisp/software/chtml-matcher-20111001-git/ 5 compiler notes: bindings.lisp:25:3: error: Objects of type FUNCTION can't be dumped into fasl files. --> LET* ASSOC ==> # note: The fourth argument never returns a value. --> LET* ==> (ASSOC (CHTML-MATCHER::CLEAN-VAR CHTML-MATCHER::VAR) #:G0 :TEST #) note: deleting unreachable code --> LET* IF SETF LET* ==> CHTML-MATCHER::DICT note: deleting unreachable code --> LET* IF SETF SB-KERNEL:%RPLACD ==> CHTML-MATCHER::VALUE bindings.lisp:25:31: note: deleting unreachable code ==> CHTML-MATCHER::VAR Compilation failed.
How to fix this or may be an workaround exists?
Thank you.
Hi there. I haven't touched this code in a couple of years and am tied up for a few weeks with a big project so won't be able to look into it. If you haven't resolved your problem, please reply to this thread and I'll take a look. First, is it just this particular case, or do even simple patterns fail?
Looks like something to do with the way assoc-setf macro is expanding, possibly having to do with the lack of an imported symbol it relies on being present? You may need to import the utils namespace into the namespace in which you are defining the top-level forms; but that's just a guess.
Hi!
I'm sorry, looks like it is sbcl-related bug (SBCL 1.1.1.0.debian).
I try ccl-1.9 instead sbcl and your library works OK and its really helpful.
Thanks!