On Wed, Oct 31, 2007 at 10:55:08AM -0400, Gary King wrote:
Hi Brandon,
The good news is that I have NOT been able to recreate the problem you're seeing. Of course, that's also the bad news! Given the error, my guess is that something has gone wrong in the file dependencies (i.e., I've missed one) and when you build files get compiled in a different order. To be more clear, my guess is that a form like this (from utilities.lisp)
(defmethod render-to-stream (document style stream-specifier) (with-stream-from-specifier (stream stream-specifier :output :if-exists :supersede) (let ((*current-document* document) (*current-format* style) (*output-stream* stream)) (setf (level document) 0 (markup document) nil) (render document style stream))))
is being compiled before the with-stream-from-specifier macro is defined. Lisp says, "OK, with-stream-from-specifier and stream must be functions. I'll wait and get their definitions later." But when later comes and Markdown calls render-to-stream, Lisp finds that there is no function associated with stream and complains.
I was hoping I'd be able to track down that file dependency problem so that others would not be snagged by it.
Here are some things to try in no particular order.
- Do you have success if specify a different stream. For example, t or
*standard-output* or a pathname (if my guess is right, this won't help).
- Does trying (asdf:oos 'asdf:load-op 'cl-markdown :force t) help?
It did... I also got some condition errors when I ran it related to cl-markdown and closer-mop. It was your typical, retry/accept compile. I chose accept.
Ran (cl-markdown:markdown "asdf") which worked.
Shutdown my running lisp image.
cd ~lisp/site/ find . -name "*.fasl" -print0 | xargs -0 rm (asdf:oos 'asdf:load-op :cl-markdown)
(cl-markdown:markdown "asdf") worked again...
- Does deleting all the fasls and recompiling help?
Yep...
So what's the: (asdf:oos 'asdf:load-op 'cl-markdown :force t) do? I tried to find information about it in the manual. Had to drop into reading the asdf.lisp file but still don't understand the behavior difference.
So was it in fact a file dependency problem or possibly something else? At this point I'm having a hard time recreating the original conditions... :(
Thanks for all your help.
Brandon