Here's what I need to get Alexandria to compile under XCVB.
Is it a problem getting this merged upstream?
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] "I believe that sex is one of the most beautiful, natural, wholesome things that money can buy." -- Steve Martin
2009/10/9 Faré fahree@gmail.com:
Here's what I need to get Alexandria to compile under XCVB.
Is it a problem getting this merged upstream?
Hum it looks like I forgot to attach the patch.
Maybe I should learn to use darcs, too. Attila suggested something, but no time right now.
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] Gods don't kill people. People with Gods kill people. - David Viaene
Here's what I need to get Alexandria to compile under XCVB.
if there's no objection against this patch, i'll eventually apply it.
although, i myself have some questions:
why is this eval-when needed? extract-function-name is not used anywhere in that file...
+(eval-when (:compile-toplevel :load-toplevel :execute) (defun extract-function-name (spec) "Useful for macros that want to mimic the functional interface for functions like #'eq and 'eq." @@ -30,6 +33,7 @@ ,@forms)))) clauses) (t ,default))))) +) ;; end EVAL-WHEN
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.
wouldn't it be nicer to do it using :compile-depends-on? if i'm not way off, that is...
2009/10/9 Attila Lendvai attila.lendvai@gmail.com:
Here's what I need to get Alexandria to compile under XCVB.
if there's no objection against this patch, i'll eventually apply it.
although, i myself have some questions:
why is this eval-when needed? extract-function-name is not used anywhere in that file...
+(eval-when (:compile-toplevel :load-toplevel :execute) (defun extract-function-name (spec) "Useful for macros that want to mimic the functional interface for functions like #'eq and 'eq." @@ -30,6 +33,7 @@ ,@forms)))) clauses) (t ,default))))) +) ;; end EVAL-WHEN
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-effect...
wouldn't it be nicer to do it using :compile-depends-on? if i'm not way off, that is...
You can also do that.
But if a function is used by macros, you'll save a lot by doing the right thing, i.e. putting that function in an EVAL-WHEN.
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] Factum, non dictum, amicus quaerit
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-effect...
[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.
alexandria-devel@common-lisp.net