Hi Vladimir,
Hi,
Currently, ABCL doesn't qualify the package of FIND-PACKAGE when it
serializes a package in a compiled file. This causes a bug when
loading a compiled file that has code (for example, the EOS:TEST macro
from the EOS unit-testing library) that serializes a package, and
occurs after an IN-PACKAGE into a package that either shadows or does
not import FIND-PACKAGE from COMMON-LISP.
I didn't work out a minimum test case, but the problem can be observed
when trying to load the Parenscript test suite:
(ql:quickload :parenscript.test)
Here's the fix:
Index: src/org/armedbear/lisp/compiler-pass2.lisp
===================================================================
--- src/org/armedbear/lisp/compiler-pass2.lisp (revision 14055)
+++ src/org/armedbear/lisp/compiler-pass2.lisp (working copy)
@@ -1191,7 +1191,7 @@
(defun serialize-package (pkg)
"Generate code to restore a serialized package."
- (emit 'ldc (pool-string (concatenate 'string "#.(FIND-PACKAGE \""
+ (emit 'ldc (pool-string (concatenate 'string "#.(CL:FIND-PACKAGE \""
(package-name pkg) "\")")))
(emit-invokestatic +lisp+ "readObjectFromString"
(list +java-string+) +lisp-object+))
Index: src/org/armedbear/lisp/Package.java
===================================================================
--- src/org/armedbear/lisp/Package.java (revision 14055)
+++ src/org/armedbear/lisp/Package.java (working copy)
@@ -865,7 +865,7 @@
public String printObject()
{
if (_PRINT_FASL_.symbolValue() != NIL && name != null) {
- StringBuilder sb = new StringBuilder("#.(FIND-PACKAGE \"");
+ StringBuilder sb = new StringBuilder("#.(CL:FIND-PACKAGE \"");
sb.append(name);
sb.append("\")");
return sb.toString();
Happy hacking,
Vladimir
_______________________________________________
armedbear-devel mailing list
armedbear-devel@common-lisp.net
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel