[asdf-devel] An interesting ASDF conundrum

Faré fare at tunes.org
Sun Jan 6 21:19:43 UTC 2013


>> I see two cases:
>> 1- The computation that creates your MADE-FILE doesn't depend on
>>  any Lisp computation. Then you could either
>>  1a- systematically perform this Make computation BEFORE the Lisp build,
>>      and have OPERATION-DONE-P return T, or
>>  1b- (that's ugly) have this computation does during OPERATION-DONE-P itself,
>>      and return T or NIL depending on whether things have changed.
>>      Actually, I don't recommend that at all: since OPERATION-DONE-P
>>      is called *after* OUTPUT-FILES timestamps have been checked,
>>      this would be bad. But maybe that's a bug in ASDF,
>>      and we should run OPERATION-DONE-P first (unless we are JUST-DONE).
>> 2- The computation that creates your MADE-FILE *does* depend on
>>  some previous Lisp computation. Then the only solution is
>>  to have this computation be a deterministic product of files
>>  that you can all declare as COMPONENTs of your system
>>  as STATIC-FILEs if need be, and/or have its INPUT-FILES return
>>  (a superset of) the set files from which it will be computed.
>>  Then OPERATION-DONE-P can just return T.
>
> I'm not entirely sure I understand your point 2.  If the makefile is
> correct, it will have all of the dependencies, and these can be computed
> by examining the file system.
>
I'm not sure what you mean by "examining the file system" unless
you put all files on a VESTA-like NFS server to intercept all accesses.
But point 2 is just "use ASDF as designed", i.e. declare your inputs
(or a superset thereof) and your outputs.

> Assuming that we keep the current technique of always running make and
> allowing IT to determine whether the made-file needs rebuilding, the
> only thing we need to do is to ensure that make is not run too early.
> That is, we must ensure that all the necessary lisp outputs are written
> into the filesystem before "make" is invoked.
>
I would recommend running anything that doesn't depend on any Lisp output
separately as a step before your build. And as for things that use Lisp output,
hopefully be able to list a superset of its inputs.

Yet another way would be to have your build happen in several steps,
so there's no interleaving of Make and ASDF, but rather one then the other.

> WRT your 1b, why would it be bad to do this because it's called after
> OUTPUT-FILES timestamps have been checked?  Since we don't have the
> INPUT-FILES for the MADE-FILE, we can't use the INPUT-FILES/OUTPUT-FILES
> relationship to determine whether or not the operation needs doing, right?
>
If the timestamps don't reflect reality, then the results of
compute-action-stamp
will be plain wrong.

For more extensibility, I suppose I could allow OPERATION-DONE-P
to return two values, a DONE-P flag and a STAMP. If that would help,
I better implement it before we release 2.27.

> This would be coupled (here's the icky part) with a PERFORM method that
> does nothing, because by the time it's invoked the make will already
> have run.
>
That's not the icky part. The icky part is OPERATION-DONE-P lying to ASDF.

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Classical liberalism is not an economic doctrine. It is a theory of Law.




More information about the asdf-devel mailing list