Subject: Re: First multi-file/package prog with lispworks personal edition on windows
From: (Rob Warnock)
Date: Thu, 26 Apr 2007 04:51:49 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Kent M Pitman  <> wrote:
| Ken Tilton <> writes:
| > Kent M Pitman wrote:
| > > Having done this, you can then do
| > >  (mapcar #'load '("pkgdcl.lisp" "my-defs.lisp" "my-callers.lisp"))
| > > but you can also break things up differently.
| > 
| > Add a remove-if there is a fasl with a more recent date and you have
| > ASDF beat.
| Indeed, instead of load, a better function should be used that does all
| of that, yes.  I have my own source control system, and indeed it does 
| that extra hair.

CMUCL's LOAD has a handy :IF-SOURCE-NEWER extension keyword:

   :IF-SOURCE-NEWER <keyword>
     If the file type is not specified, and both source and object files
     exist, then this argument controls which is loaded:
      :LOAD-OBJECT - load object file (default),
      :LOAD-SOURCE - load the source file,
      :COMPILE - compile the source and then load the object file, or
      :QUERY - ask the user which to load.

I have a little LOAD* function that remembers args you've given
it in the past, and given no args runs through the list checking
the source FILE-WRITE-DATE against the last time LOAD* was run,
and if the source is newer that the timestamp it does
(LOAD source :IF-SOURCE-NEWER :COMPILE). So if at some point
you say:

    (load* "pkgdcl.lisp" "my-defs.lisp" "my-callers.lisp")

then after that if you edit one or more of them and say just
(LOAD*), "the right thing" happens.

Yes, I use ASDF for bigger projects, but LOAD* gets me a long way
during development...


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607