[Openmcl-devel] problem loading builder-utilities from ccl-ide-init
Gary Byers
gb at clozure.com
Mon Dec 10 16:38:07 PST 2012
Part of the problem is that the file violates the well-known rule
which states "all files are encoded in utf-8 and if they aren't that's
not my problem". It seems that the string which is the value of
$default-info-plist-getInfo-string is supposed to contain a copyright
sign (#\u00a9) followed by a space. The file was apparently actually
encoded in iso-8859-1 (or some similar 8-bit encoding), so that
sequence of characters (#\copyright_sign #\space) is encoded as the
octets #xa9 #x20. The trunk currently sets
*DEFAULT-FILE-CHARACTER-ENCODING* to :UTF-8 (following the rule
above), and the octet sequence #xa9 #x20 isn't valid utf-8. The trunk
signals a condition (supposed to be of type DECODING-PROBLEM but
apparently isn't at least sometimes) in this case and generates a
#\replacement_character; the idea behind signaling a condition rather
than treating this case as an error is that policy decisions like that
are best made by higher-level code (higher level than the guts of
READ-CHAR.)
Something in the bridge or in the event loop (my being more precise
about that depends on sufficient caffeination, which may take a while)
effectively handles that condition, and the effect of that is to throw
out of the LOAD (closing the file) and (I think ...) resuming the
event loop.
There are several bugs here. One workaround that'll work for a while is
to do:
(let* ((ccl:*default-file-character-encoding* :iso-8859-1))
(require "BUILDER-UTILITIES"))
On Mon, 10 Dec 2012, Paul Krueger wrote:
> Using 1.9-dev-r15527M-trunk (DarwinX8664) I am having trouble loading a ccl-ide-init file that loads just fine when I do it from the listener after the IDE comes up. I traced that problem to a require of builder-utilities (i.e. ccl/cocoa-ide/builder-utilities) that I was doing and specifically within that file to the following line:
>
> (defparameter $default-info-plist-getInfo-string "\"1.0 Copyright ??? 2008\"")
> Everything up to $cfbundle-getinfo-string-key (which is defined on the previous line) gets defined and nothing after that is.
>
> I created a simple test version of the ccl-ide-init file by just doing a copy/paste of the failing line:
>
> (format t "beginning ccl-ide-init~%")
> (defparameter $default-info-plist-getInfo-string "\"1.0 Copyright ??? 2008\"")
> (format t "ending ccl-ide-init~%")
>
> and it loaded just fine with both format statements executed. Then I created a ccl-ide-init file with the following lines:
>
> (format t "beginning ccl-ide-init~%")
> (require :builder-utilities)
> (format t "ending ccl-ide-init~%")
>
> which once again quietly failed to load the builder-utilities file (failing at the same place) and the second format statement was not executed.
>
> Any ideas what's going on?
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
More information about the Openmcl-devel
mailing list