[asdf-devel] compile-with-nicknames (a possible compromise?)
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Mon Oct 17 11:37:10 UTC 2011
On Mon, Oct 17, 2011 at 9:58 AM, Juan Jose Garcia-Ripoll <
juanjose.garciaripoll at googlemail.com> wrote:
> In a sense, it is a _reversed_ dependency. Normally we have that file2
> depends on file1 and thus file2 is loaded _after_ file1 is loaded. Couldn't
> we just add another component to defsystem which is loaded when _any_ file
> is to be changed? It would be like a prerequisite module or file.
Related to this, I appreciate that also what is exactly missing in ASDF is
_operations_ that have to be performed before or after some system is loaded
/ compiled / etc.
Operations should not be part of the ASDF file. If we didn't have ASDF what
we would naturally do is group them in a file which is loaded before
everything else (or sometimes after it), for preparation (and for cleanup),
typically.
Thinking about the most general way to do it, which does not involve any
methods whatsoever, and such that the whole system may also be loaded
without ASDF, I think the best way would be to have some declaration such as
{:after | :before} (operation+)
operation = (operation-pattern module-to-be-loaded)
operation-pattern = {* | asdf-operation-class-symbol}
The syntax is reminiscent of :in-order-to for the module and the operation,
and it only differs in the time in which it is performed.
I believe this very much solves all the problems listed so far. It also has
some advantages over explicit lisp forms, for it avoids problems with
non-existent packages at the time of reading the asdf, and it also
generalizes to all operations.
I also insist that having the operations being actually stored in files
makes it relatively easy to map an ASDF to a set of load statements, making
the library rather independent of actual ASDF complexities.
Juanjo
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20111017/dbc08e57/attachment.html>
More information about the asdf-devel
mailing list