[asdf-devel] Trying again

Robert Goldman rpgoldman at sift.info
Fri Feb 12 16:21:24 UTC 2010


On 2/12/10 Feb 12 -8:07 AM, Faré wrote:
>>> : Faré
>> : james anderson
>>
>>> Maybe the current timestamps in ASDF are somewhat lacking, but
>>> that doesn't mean timestamps can't solve the issue. I think that
>>> one timestamp per pair (op component) should do the trick, stored
>>> as an alist (op timestamp) in a slot of the component.
>>
>> is that not what the `operation-time` cache[1] is already there to do?
>>
> Indeed.
> 
> I propose to modify operation-done-p as follows i.e. always check op-time.
> 
> (defmethod operation-done-p ((o operation) (c component))
>   (let ((out-files (output-files o c))
>         (in-files (input-files o c))
>         (op-time (gethash (type-of o)
>                           (component-operation-times c))))
>     (and op-time
>      (cond
>        ((and (not in-files) (not out-files)))
>         ;; arbitrary decision: an operation that uses nothing to
>         ;; produce nothing probably isn't doing much,
>         t)
>        ((not out-files)
>         (>= op-time
>          (apply #'max
>                 (mapcar #'safe-file-write-date in-files))))
>        ((not in-files) nil)
>        (t
>         (and
>          (every #'probe-file in-files)
>          (every #'probe-file out-files)
>          (> (apply #'min (mapcar #'safe-file-write-date out-files))
>             (apply #'max (mapcar #'safe-file-write-date in-files))))))))
> 
>> (traverse x operation-done-p) reads as if module-level "done-p" is
>> hard-coded[2] with logic, which is different than that for components in
>> general, and which does not act on this cache. perhaps some protocol
>> additions would work here.
>> anyway, wrt to the question on line 1265, the codes reads as if the
>> answer might be that dominant operation nodes should be able to specify the
>> particular particular sub-operations to force.
>>
> I admit traverse is a mess that I haven't gotten my head fully around yet,
> so I'll leave more knowledgeable people to comment.

See earlier responses.  The problem with this modification is the dual
definition of performing an operation on a module.  Operation-done-p as
applied to a module really only applies to the immediate call of PERFORM
on the module object --- i.e., what you do in the post-order tree
traversal.  It does NOT get applied when you are considering the
intuitive notion of performing an operation to a module --- that is, the
whole operation of performing on the module object itself /and its
components/.

That whole mess needs to be teased apart before we can get a version of
ASDF that will do the right thing there.

best,
r




More information about the asdf-devel mailing list