[asdf-devel] Change in the way ASDF performs a plan? Or :force semantics?
Robert Goldman
rpgoldman at sift.info
Wed Feb 6 00:41:16 UTC 2013
I was having a case where some package wrangling in one of our systems behaved
differently with new ASDF than with the ASDF 2 that ships with ACL.
It seemed like there was an :AFTER method on one of my modules that simply
wasn't being called.
I took my usual resort and did
(TRACE ASDF:PERFORM).
I was very surprised to see that my
(asdf:load-system "circa-csm" :force t)
resulted in only four calls to perform, and all of them had to do with ASDF:
CL-USER> (asdf:load-system "circa-csm" :force t)
; Loading /Users/rpg/lisp/asdf/asdf.asd
; Loading /Users/rpg/lisp/asdf/asdf-driver.asd
0[7]: (ASDF/ACTION:PERFORM #<ASDF/LISP-ACTION:PREPARE-OP >
#<ASDF/SYSTEM:SYSTEM "asdf">)
0* (MULTIPLE-VALUE-PROG1 (PROGN #<STANDARD-METHOD
ASDF/ACTION:PERFORM
:BEFORE
(ASDF/OPERATION:OPERATION
ASDF/COMPONENT:COMPONENT)>
#<STANDARD-METHOD
ASDF/ACTION:PERFORM
(ASDF/LISP-ACTION:PREPARE-OP
ASDF/COMPONENT:COMPONENT)>)
#<STANDARD-METHOD ASDF/ACTION:PERFORM :AFTER
(ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)>)
0[7]: returned NIL
0[7]: (ASDF/ACTION:PERFORM #<ASDF/LISP-ACTION:PREPARE-OP >
#<ASDF/COMPONENT:MODULE "asdf" "build">)
0* (MULTIPLE-VALUE-PROG1 (PROGN #<STANDARD-METHOD
ASDF/ACTION:PERFORM
:BEFORE
(ASDF/OPERATION:OPERATION
ASDF/COMPONENT:COMPONENT)>
#<STANDARD-METHOD
ASDF/ACTION:PERFORM
(ASDF/LISP-ACTION:PREPARE-OP
ASDF/COMPONENT:COMPONENT)>)
#<STANDARD-METHOD ASDF/ACTION:PERFORM :AFTER
(ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)>)
0[7]: returned NIL
0[7]: (ASDF/ACTION:PERFORM #<ASDF/LISP-ACTION:PREPARE-OP >
#<ASDF/LISP-ACTION:CL-SOURCE-FILE
"asdf" "build" "asdf">)
0* (MULTIPLE-VALUE-PROG1 (PROGN #<STANDARD-METHOD
ASDF/ACTION:PERFORM
:BEFORE
(ASDF/OPERATION:OPERATION
ASDF/COMPONENT:COMPONENT)>
#<STANDARD-METHOD
ASDF/ACTION:PERFORM
(ASDF/LISP-ACTION:PREPARE-OP
ASDF/COMPONENT:COMPONENT)>)
#<STANDARD-METHOD ASDF/ACTION:PERFORM :AFTER
(ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)>)
0[7]: returned NIL
0[7]: (ASDF/ACTION:PERFORM #<ASDF/LISP-ACTION:LOAD-OP >
#<ASDF/LISP-ACTION:CL-SOURCE-FILE
"asdf" "build" "asdf">)
0* (MULTIPLE-VALUE-PROG1 (PROGN #<STANDARD-METHOD
ASDF/ACTION:PERFORM
:BEFORE
(ASDF/OPERATION:OPERATION
ASDF/COMPONENT:COMPONENT)>
#<STANDARD-METHOD
ASDF/ACTION:PERFORM
(ASDF/LISP-ACTION:LOAD-OP
ASDF/LISP-ACTION:CL-SOURCE-FILE)>)
#<STANDARD-METHOD ASDF/ACTION:PERFORM :AFTER
(ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)>)
; Fast loading
; /Users/rpg/.cache/common-lisp/acl-8.2-macosx-x64/Users/rpg/lisp/asdf/build/asdf.fasl
0[7]: returned T
;;; from here on down there's lots of loading, but no recompilation (as I
;;; expected from :force t) and no calls to PERFORM.
; Fast loading
; /Users/rpg/.cache/common-lisp/acl-8.2-macosx-x64/Users/rpg/circa/code/csm/musliner-tools.fasl
; Fast loading
; /Users/rpg/.cache/common-lisp/acl-8.2-macosx-x64/Users/rpg/circa/code/csm/stochastic.fasl
Or -- oh, wait! Did the recompilation of ASDF killed the tracing?
If so, I don't think that :force t should be causing ASDF itself to rebuild. I
understand why it's a dependency, but this shows why it's inappropriate:
rebuilding asdf destroys our ability to inspect its behavior.
Oh, and maybe it's also killing the PERFORM :after method in my system definition?
I'd suggest :force t should stop before it gets to ASDF itself. Maybe we need
to add :force :omg to do that! ;-)
Cheers,
r
More information about the asdf-devel
mailing list