[alexandria-devel] XCVB patch for Alexandria
Attila Lendvai
attila.lendvai at gmail.com
Fri Oct 16 07:30:22 UTC 2009
>> why is this eval-when needed? extract-function-name is not used
>> anywhere in that file...
>>
>> or does xcvb need everything to be also eval-when'd at
>> :compile-toplevel which is used at compile time (e.g. in a macro body)
>> in any other file that depends on it? that sounds like a strong
>> requirement, especially if it's the default... not something that one
>> can not live with, but something substantially different than asdf.
>>
> It is a strong requirement, and it is indeed the default, and this
> requirement is compatible with the CLHS 3.2.2.3. Yes it is
> substantially different than ASDF. Note however that if this irks you
> a lot you can disable the CFASL functionality.
>
> http://common-lisp.net/project/xcvb/doc/README.html#compile-time-side-effects
[some xcvb-devel mails later]
please read that paragraph in the XCVB readme on the above link! (it
has been updated since then, and it describes why the extra eval-when
(:compile-topleve :load-toplevel :execute) are needed compared to when
loading with ASDF)
for the lazy: using a defun in a macro in the same file requires
eval-always with ASDF. this scope has been extended to entire modules
in XCVB when it's using cfasl's.
it means that the usage of eval-when (:compile-topleve :load-toplevel
:execute) will be considerably more frequent than it used to be with
ASDF. in alexandria's case it's +3 eval-alway's (i'll open another
thread about eval-always).
as an alternative to the extra eval-when's, one can use the
:compile-depends-on dependency with XCVB, but it is a much more coarse
way of the dependencies which strongly affects, among other things,
recompilations.
so, we have a decision point here:
a) follow The Right Way, and add the extra 3 eval-when's to alexandria
b) just switch to :compile-depends-on for the files in question and
ignore that it'll enforce a more coarse and stronger dependency
between files than actually necessary
my vote is for a), and if no further feedback comes on this, then i'll
push that version of the patch eventually.
--
attila
More information about the alexandria-devel
mailing list