Apparently, it is incorrect to try to update ASDF from a system where an older version of ASDF has already been loaded from which some DEFUNs (e.g. SYSTEM-SOURCE-FILE) have since converted to DEFGENERICs. This means that if you have an old clisp from debian and try to use the newer ASDF, you're out of luck.
As a remedy, could we prepend the defpackage in asdf.lisp with the following?
(eval-when (:compile-toplevel :load-toplevel) (let ((package (find-package '#:asdf))) (when package (delete-package package))))
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] Instead of loving your enemies, treat your friends a little better. -- Edgar Watson Howe
---------- Forwarded message ---------- From: Sam Steingold sds@gnu.org Date: 2009/7/8 Subject: Re: can't compile-file then load asdf.lisp To: Faré fahree@gmail.com Cc: clisp-list@lists.sourceforge.net
Faré wrote:
If I grab the latest asdf.lisp from git and try to compile-file it
the one I have comes from http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cclan/asdf/ and it compiles and loads just fine.
then load it, I get a weird error message.
WARNING: DEFGENERIC: redefining function SYSTEM-SOURCE-FILE in /dev/shm/tmp/fare/xcvb-0.320/dependencies/asdf/asdf.fas, was defined in top-level *** - ENSURE-GENERIC-FUNCTION: SYSTEM-SOURCE-FILE does not name a generic function
this means that you have defined a regular function (with DEFUN) and now are trying to redefine it with DEFGENERIC. since asdf.lisp does not do that, you, apparently, have this function defined somewhere else.
2009/7/9 Faré fahree@gmail.com:
Apparently, it is incorrect to try to update ASDF from a system where an older version of ASDF has already been loaded from which some DEFUNs (e.g. SYSTEM-SOURCE-FILE) have since converted to DEFGENERICs. This means that if you have an old clisp from debian and try to use the newer ASDF, you're out of luck.
As a remedy, could we prepend the defpackage in asdf.lisp with the following?
(eval-when (:compile-toplevel :load-toplevel) (let ((package (find-package '#:asdf))) (when package (delete-package package))))
I don't think this a good idea in general: when users are bit by this they can deal with the error and delete the package by hand.
If we do this automatically, however, reloading the same version twice will cause all methods that were added later to be forgotten, as well as additions to *CENTRAL-REGISTRY*, etc.
If something along the lines is put it, I would suggest that TRT is to signal an error and offer restarts to either delete the package or continue blindly.
Cheers,
-- Nikodemus
If something along the lines is put it, I would suggest that TRT is to signal an error and offer restarts to either delete the package or continue blindly.
I agree and it seems that a named restart would allow XCVB function correctly, right?
-- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM * gwking on twitter
2009/7/9 Gary King gwking@metabang.com:
If something along the lines is put it, I would suggest that TRT is to signal an error and offer restarts to either delete the package or continue blindly.
I agree and it seems that a named restart would allow XCVB function correctly, right?
No it wouldn't, and on second thoughts, I agree that it's all a problem of system construction that a mere source file like asdf.lisp can't properly handle on its own.
XCVB is a big boy, and the install scripts will include a "setup" file that deletes any old asdf as the first thing during the build.
On the other hand, it would be nice if ASDF would include the build.xcvb and the module form. If you have an objection to either, I'm curious what it is and I'll find another solution.
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] One can be so anxious to put his "best foot forward" that he doesn't even notice that it isn't his own foot. -- Harry Browne (HIFFIAUW)
On the other hand, it would be nice if ASDF would include the build.xcvb and the module form. If you have an objection to either, I'm curious what it is and I'll find another solution.
I agree. I'll apply your patch and push soon.
-- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM * gwking on twitter