#342: missing default method for gray-streams:stream-finish-output
------------------------+-----------------------
Reporter: avodonosov | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: streams | Version: 1.3.0-dev
Keywords: |
------------------------+-----------------------
Test case:
{{{
(ql:quickload :flexi-streams)
(let* ((binary-stream (flexi-streams:make-in-memory-output-stream)))
(finish-output binary-stream))
The value #<FLEXI-STREAMS::VECTOR-OUTPUT-STREAM {1E566F3}> is not of type
#<STANDARD-CLASS FLEXI-STREAMS:FLEXI-OUTPUT-STREAM {7D84CE}>.
[Condition of type SIMPLE-TYPE-ERROR]
Backtrace:
0: (#<FUNCTION {1C9E6C0}> #<SIMPLE-TYPE-ERROR {FC82A6}> #<FUNCTION
{1C9E6C0}>)
1: (APPLY #<FUNCTION {1C9E6C0}> (#<SIMPLE-TYPE-ERROR {FC82A6}>
#<FUNCTION {1C9E6C0}>))
2: (SYSTEM::RUN-HOOK SYSTEM::*INVOKE-DEBUGGER-HOOK* #<SIMPLE-TYPE-ERROR
{FC82A6}> #<FUNCTION {1C9E6C0}>)
3: (INVOKE-DEBUGGER #<SIMPLE-TYPE-ERROR {FC82A6}>)
4: (GRAY-STREAMS:STREAM-FINISH-OUTPUT #<FLEXI-STREAMS::VECTOR-OUTPUT-
STREAM {1E566F3}>)
5: (SYSTEM::%FINISH-OUTPUT #<FLEXI-STREAMS::VECTOR-OUTPUT-STREAM
{1E566F3}>)
6: (FINISH-OUTPUT #<FLEXI-STREAMS::VECTOR-OUTPUT-STREAM {1E566F3}>)
}}}
This happens because there is no default method for stream-finish-output.
According to the Gray proposal, default method should exist and do
nothing.
The fix:
{{{
Index: src/org/armedbear/lisp/gray-streams.lisp
===================================================================
--- src/org/armedbear/lisp/gray-streams.lisp (revision 14464)
+++ src/org/armedbear/lisp/gray-streams.lisp (working copy)
@@ -314,6 +314,10 @@
(declare (ignore stream))
nil)
+(defmethod stream-finish-output (stream)
+ (declare (ignore stream))
+ nil)
+
(defmethod stream-clear-output (stream)
(declare (ignore stream))
nil)
}}}
Also, ABCL handles the absence of default method not very correctly.
It should signal "no applicable method". What happens here is that flexi-
streams overrides
stream-finish-output for one of its classes - FLEXI-STREAMS:FLEXI-OUTPUT-
STREAM.
So, I think ABCL sees that there is only one variant of method,
and tries to apply this method, despite we pass object of another class.
And here typecast happen.
--
Ticket URL: <http://abcl.org/trac/ticket/342>
armedbear <http://abcl.org>
armedbear
#340: DIRECTORY applied to symbolic links with non-existent targets returns
errors
-------------------------+-----------------------
Reporter: mevenson | Owner:
Type: defect | Status: new
Priority: major | Milestone: 1.3.0
Component: interpreter | Version: 1.3.0-dev
Keywords: |
-------------------------+-----------------------
Alan Ruttenberg notes
[http://article.gmane.org/gmane.lisp.armedbear.devel/3048]:
{{{
Emacs creates files like this:
lrwxr-xr-x 1 alanr staff 30 Jan 6 01:40 .#foo.sql <at> ->
alanr@...
as lock files, IIRC.
In such cases, the target of link names a file that doesn't exist.
#'directory calls #'truename on the filenames that are listed, and
truename does a probe file. Incidentally It looks like that is done in
the java as well as the lisp function making the latter redundant.
It seems wrong that there is a situation in which one can't call
directory at all without getting an error.
The crux of the matter is how to interpret the documentation of
truename in the presence of symbolic links. The doc for truename
says: If filespec is a pathname it represents the name used to open
the file. This may be, but is not required to be, the actual name of
the file."
"actual name of the file" suggests that there is a file, but also
suggests that it is the name that is important. Also whereas directory
allows implementation-dependent keywords, truename is not so defined.
I'll take the position that truename should *not* depend on the file
existing, but rather focus on what names are present in directory
structures. So resolve-truenames nil should should return the names in
the directory and for resolve-truenames t it should follow symbolic
links as long as they can be followed without hitting a name that
doesn't designate an existing file.
}}}
Note that followup comments by Alan and Marco to the behavior of SBCL and
CCL, and the relation to the Hyperspec were not picked up in the Gmane
archives.
--
Ticket URL: <http://abcl.org/trac/ticket/340>
armedbear <http://abcl.org>
armedbear
#341: DIRECTORY with :resolve-symlinks T still returns the TRUENAME of the link
--------------------------+-------------------
Reporter: mevenson | Owner:
Type: defect | Status: new
Priority: major | Milestone: 1.3.0
Component: interpreter | Version: 1.2.1
Keywords: CL:DIRECTORY |
--------------------------+-------------------
Gabor Balzacs notes in
[http://article.gmane.org/gmane.lisp.armedbear.devel/3043] that DIRECTORY
seemingly ignores :resolve-symlinks parameters in the following case:
{{{
-rw-r--r-- 1 user group 0 Dec 15 11:00 file
lrwxrwxrwx 1 user group 4 Dec 15 11:00 link -> file
CL-USER(3): (directory "./*" :resolve-symlinks nil)
(#P"/home/user/test/file" #P"/home/user/test/file")
The result should be (#P"/home/user/test/file" #P"/home/user/test/link").
}}}
--
Ticket URL: <http://abcl.org/trac/ticket/341>
armedbear <http://abcl.org>
armedbear
#337: PROBE-FILE for jar file entries accessed via http fails
--------------------------+-----------------------------------------
Reporter: mevenson | Owner:
Type: defect | Status: new
Priority: major | Milestone: 1.3.0
Component: interpreter | Version: 1.2.1-dev
Resolution: | Keywords: jar-pathname abcl-test-lisp
--------------------------+-----------------------------------------
Comment (by mevenson):
Currently believed to be a problem finding a class to load due to improper
encapsulation of previous use of pathnames with TYPE "_".
q.v. Load.findLoadableFile()
--
Ticket URL: <http://abcl.org/trac/ticket/337#comment:2>
armedbear <http://abcl.org>
armedbear