--
|a\o/r|,-------------.,---------- Timofei Shatrov aka Grue ------------.
| m"a ||FC AMKAR PERM|| mail: grue at mail.ru http://grue3.tripod.com |
| k || PWNZ J00 || Kingdom of Loathing: Grue3 lvl 18 Seal Clubber |
`-----'`-------------'`-------------------------------------------[4*72]
>
>I'm experiencing a very annoying problem. I'm trying to install
>UnCommonWeb and there are some libraries used, among them Arnesi, YACLML
>and RFC2388. The problem is that after loading these files ASDF
>miraculously eats them, reducing them to 0-byte files. Surely it's not
>supposed to do that: the files should be opened only for input and there
>should be no way to change them. Anyone had a similar problem? I'm using
>latest CLISP on Windows and the latest version of the above libraries.
So, no one has any idea? Or I was just killfiled by anyone for some
reason(I can guess...)? I figured out that CLISP 2.35 doesn't erase
files like that. It also doesn't fatally crash about halfway on loading
all these libraries. I guess I'll report a bug... Until then, avoid
using ASDF on CLISP 2.36 for it may accidentally erase your files.
> On Wed, 14 Dec 2005 11:00:49 GMT, gr...@mail.ru (Timofei Shatrov) tried
> to confuse everyone with this message:
>
>>
>>I'm experiencing a very annoying problem. I'm trying to install
>>UnCommonWeb and there are some libraries used, among them Arnesi, YACLML
>>and RFC2388. The problem is that after loading these files ASDF
>>miraculously eats them, reducing them to 0-byte files. Surely it's not
>>supposed to do that: the files should be opened only for input and there
>>should be no way to change them. Anyone had a similar problem? I'm using
>>latest CLISP on Windows and the latest version of the above libraries.
>
> So, no one has any idea? Or I was just killfiled by anyone for some
> reason(I can guess...)? I figured out that CLISP 2.35 doesn't erase
> files like that. It also doesn't fatally crash about halfway on loading
> all these libraries. I guess I'll report a bug... Until then, avoid
> using ASDF on CLISP 2.36 for it may accidentally erase your files.
clisp bugs are better reported on the clisp mail lists. Check on sourceforge.net
--
__Pascal Bourguignon__ http://www.informatimago.com/
Nobody can fix the economy. Nobody can be trusted with their finger
on the button. Nobody's perfect. VOTE FOR NOBODY.
>gr...@mail.ru (Timofei Shatrov) writes:
>
>> On Wed, 14 Dec 2005 11:00:49 GMT, gr...@mail.ru (Timofei Shatrov) tried
>> to confuse everyone with this message:
>>
>>>
>>>I'm experiencing a very annoying problem. I'm trying to install
>>>UnCommonWeb and there are some libraries used, among them Arnesi, YACLML
>>>and RFC2388. The problem is that after loading these files ASDF
>>>miraculously eats them, reducing them to 0-byte files. Surely it's not
>>>supposed to do that: the files should be opened only for input and there
>>>should be no way to change them. Anyone had a similar problem? I'm using
>>>latest CLISP on Windows and the latest version of the above libraries.
>>
>> So, no one has any idea? Or I was just killfiled by anyone for some
>> reason(I can guess...)? I figured out that CLISP 2.35 doesn't erase
>> files like that. It also doesn't fatally crash about halfway on loading
>> all these libraries. I guess I'll report a bug... Until then, avoid
>> using ASDF on CLISP 2.36 for it may accidentally erase your files.
>
>clisp bugs are better reported on the clisp mail lists. Check on sourceforge.net
I already reported the bugs. I also downgraded to 2.35 for the time
being... who knows what would be eaten next time...
try making the files read-only, see when CLISP signals an error.
(try "?" or ":h" for help in the debugger)
--
Sam Steingold (http://www.podval.org/~sds) running w2k
http://www.jihadwatch.org/ http://truepeace.org
http://www.mideasttruth.com/ http://www.honestreporting.com
Of course, I haven't tried it. But it will work. - Isaak Asimov
You hear maniacal laughter in the distance...
The hair on the back of your neck stands up!
--
Sam Steingold (http://www.podval.org/~sds) running w2k
http://www.iris.org.il http://www.openvotingconsortium.org/
http://www.savegushkatif.org http://truepeace.org http://ffii.org/
Lisp is a way of life. C is a way of death.
>> * Timofei Shatrov <te...@znvy.eh> [2005-12-14 11:00:49 +0000]:
>>
>> I'm experiencing a very annoying problem. I'm trying to install
>> UnCommonWeb and there are some libraries used, among them Arnesi, YACLML
>> and RFC2388. The problem is that after loading these files ASDF
>> miraculously eats them, reducing them to 0-byte files. Surely it's not
>> supposed to do that: the files should be opened only for input and there
>> should be no way to change them. Anyone had a similar problem? I'm using
>> latest CLISP on Windows and the latest version of the above libraries.
>
>try making the files read-only, see when CLISP signals an error.
>(try "?" or ":h" for help in the debugger)
You're a genius! Using this method I found the faulty code (CLISP is
innocent). In asdf-extensions.lisp by Peter Seibel there is the
following method:
(defmethod perform :after ((operation compile-op) (c static-file))
(let ((source-file (component-pathname c))
(output-file (car (output-files operation c))))
(ensure-directories-exist output-file)
(with-open-file (in source-file :element-type '(unsigned-byte 8))
(with-open-file (out output-file :element-type '(unsigned-byte 8)
:direction :output :if-exists :supersede)
(loop for octet = (read-byte in nil nil)
while octet do (write-byte octet out))))))
Guess what happens when output-file and source-file are the same (why
they are the same is another question)? The file gets erased by second
with-open-file and then writes its empty contents into itself! The code
doesn't create problems when used by SLIME, but when used from console
can cause some damage.
so, first I "tried to confuse everyone with [my] message",
and then I turned out to be a genius.
I guess all the c.l.l readers are now terminally confused. :-)
> Using this method I found the faulty code (CLISP is innocent). In
> asdf-extensions.lisp by Peter Seibel there is the following method:
>
> (defmethod perform :after ((operation compile-op) (c static-file))
> (let ((source-file (component-pathname c))
> (output-file (car (output-files operation c))))
> (ensure-directories-exist output-file)
> (with-open-file (in source-file :element-type '(unsigned-byte 8))
> (with-open-file (out output-file :element-type '(unsigned-byte 8)
> :direction :output :if-exists :supersede)
> (loop for octet = (read-byte in nil nil)
> while octet do (write-byte octet out))))))
>
> Guess what happens when output-file and source-file are the same
the test should be
(equal (probe-file source-file) (probe-file output-file))
not just
(equal source-file output-file)
because of symbolic links &c.
Still this is unreliable due to hard links.
you actually need the inode!
> (why they are the same is another question)? The file gets erased by
> second with-open-file and then writes its empty contents into itself!
> The code doesn't create problems when used by SLIME, but when used
> from console can cause some damage.
I now added a check to CLISP OPEN for a already open file being
re-opened.
You will get a continuable error if you open an already opened file
unless both opens are read-only.
Please try CVS head.
--
Sam Steingold (http://www.podval.org/~sds) running w2k
http://www.savegushkatif.org http://www.iris.org.il http://www.dhimmi.com/
http://www.jihadwatch.org/ http://truepeace.org http://ffii.org/
Illiterate? Write today, for free help!