Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

.asd files getting eaten by ASDF!

0 views
Skip to first unread message

Timofei Shatrov

unread,
Dec 14, 2005, 6:00:49 AM12/14/05
to

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.

--
|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]

Timofei Shatrov

unread,
Dec 15, 2005, 7:07:34 AM12/15/05
to
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.

Pascal Bourguignon

unread,
Dec 15, 2005, 9:46:29 AM12/15/05
to
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

--
__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.

mk

unread,
Dec 15, 2005, 9:48:14 AM12/15/05
to
I'm using clisp-2.36 and clisp-cvs and both work just fine with the
latest asdf.

Timofei Shatrov

unread,
Dec 15, 2005, 10:24:45 AM12/15/05
to
On Thu, 15 Dec 2005 15:46:29 +0100, Pascal Bourguignon
<sp...@mouse-potato.com> tried to confuse everyone with this message:

>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...

Sam Steingold

unread,
Dec 15, 2005, 10:32:34 AM12/15/05
to Timofei Shatrov
> * 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)

--
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

Sam Steingold

unread,
Dec 15, 2005, 10:54:20 AM12/15/05
to Timofei Shatrov
> * Timofei Shatrov <te...@znvy.eh> [2005-12-15 15:24:45 +0000]:

>
> ... who knows what would be eaten next time...

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

unread,
Dec 15, 2005, 2:19:44 PM12/15/05
to
On Thu, 15 Dec 2005 10:32:34 -0500, Sam Steingold <s...@gnu.org> tried to

confuse everyone with this message:

>> * 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.

Sam Steingold

unread,
Dec 16, 2005, 11:16:24 AM12/16/05
to Timofei Shatrov
> * Timofei Shatrov <te...@znvy.eh> [2005-12-15 19:19:44 +0000]:

>
> On Thu, 15 Dec 2005 10:32:34 -0500, Sam Steingold <s...@gnu.org> tried to
> confuse everyone with this message:
>
>>try making the files read-only, see when CLISP signals an error.
>>(try "?" or ":h" for help in the debugger)
>
> You're a genius!

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!

0 new messages