[asdf-devel] ASDF:LOAD-SYSTEM always recompiles some files

Robert Goldman rpgoldman at sift.info
Tue Jul 13 16:09:15 UTC 2010


On 7/13/10 Jul 13 -2:25 AM, Benjamin Benninghofen wrote:
> 
> 
> Robert Goldman wrote:
> 
>> I believe that your problem may come from introducing the intermediate
>> :modules.  You may find that collecting the results of
>>
>> (asdf::traverse (make-instance 'asdf:load-op) (find-system :foo))
>>
>> Try rewriting your defsystem more along these lines:
>>
>> (ASDF:DEFSYSTEM :FOO :COMPONENTS
>>                ((:FILE "foo"))
>>                 (:FILE "bar" :depends-on ("foo")))
>>  
>>
> However the intermediate :modules are correct and in any case when
> the compiler is invoked when no source changed is a bug of ASDF ?

[warning:  I am writing this from a conference, so I am not in a good
position to verify or research.  take the following with a grain of salt.]

Sort of.

It is a poorly-understood aspect of ASDF that the plan to build the
above is not equivalent to the plan to build your original system.

My system's load plan will be something like:

compile-op, foo.lisp
load-op, foo.lisp
compile-op, bar.lisp
compile-op, foo system
load-op, bar.lisp
load-op, foo system

[I am using "foo.lisp" to refer to the component of type cl-source-file,
to distinguish from same-name components of other types...]

For your system, the plan will be something like:

compile-op, foo.lisp
compile-op, module foo
load-op, foo.lisp
load-op, module foo
compile-op, bar.lisp
compile-op, module bar
compile-op, foo system
load-op, bar.lisp
load-op, module bar
load-op, foo system

Note that this plan is longer.

My bet (and I'm not really in a position to verify this right now, see
above) is that ASDF doesn't realize that the module operations have been
done already, so that it ends up thinking that bar's dependencies (which
include the MODULE foo) have changed, so it adds additional operations.

I will try to investigate this further, but it might be a couple of
weeks before I can dig in.

best,
r




> 
>> I will try to investigate this further (esp if you post a ticket to
>> launchpad), but can't get to it for a while, so suggest you work around
>> by revising the defsystem.
>>
>> BTW, why is your system definition not in foo.asd?
>>  
>>
> In my last mail you also see a commented out SCT:DEFSYSTEM form. That
> SCT:DEFSYSTEM
> form can be used in Genera and SCT:DEFSYSTEM furthermore is a macro
> developed by
> myself to be used in other Lisp systems (Allegro, CLISP). The
> ASDF:DEFSYSTEM form
> indeed is the macro expansion of the SCT:DEFSYSTEM form.
> 
> In order to have a straightforward implementation of the SCT:DEFSYSTEM
> macro, the
> structure of modules and files from the SCT:DEFSYSTEM is preserved. This
> explains
> where the intermediate modules come from.
> 
> All my Lisp programs were written under OpenGenera and there it is
> customary to
> have the system definition in a file "sysdcl.lisp". I just want to copy
> the Lisp
> source files from the Symbolics to another computer and execute
> (SCT:MAKE '(:FOO))
> in the other Lisp in order to Load (and Compile if needed) the software
> there.
> 





More information about the asdf-devel mailing list