From brandon at cs.uri.edu Thu Nov 1 18:48:18 2007 From: brandon at cs.uri.edu (Brandon Edens) Date: Thu, 1 Nov 2007 14:48:18 -0400 Subject: [cl-markdown-devel] The function STREAM is undefined? In-Reply-To: References: <20071029222318.GY29187@bruno> Message-ID: <20071101184818.GC27046@bruno> 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. > > 1. 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). > > 2. 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... > 3. 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 -- Brandon Edens brandon at cs.uri.edu http://www.brandonedens.org key 0x42248B92 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: