<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.3.2">
</HEAD>
<BODY>
The following changes make me all green, even after repeated test runs,<BR>
even on databases that are fresh, under SBCL 9.9 under Linux, under<BR>
both SQL and BDB.<BR>
<BR>
In serializer.lisp, this code is needed:<BR>
> ;; This circumlocution is necessitated by<BR>
> ;; an apparent bug in SBCL 9.9 --- type-of sometimes<BR>
> ;; does NOT return the "proper name" of the class as the<BR>
> ;; CLHS says it should, but gives the class object itself,<BR>
> ;; which cannot be directly serialized....<BR>
> (let ((tp (type-of frob)))<BR>
> #+(or sbcl)<BR>
> (if (not (symbolp tp))<BR>
> (setf tp (class-name (class-of frob))))<BR>
> (%serialize tp))<BR>
> )<BR>
<BR>
<BR>
Additionally, I had to change the idiom in the tests to handle the case<BR>
that the persistent classes exist in the DB from a previous test run,<BR>
but have not yet been even defined as classes in the LISP object space.<BR>
For example, in indexing-reconnect-db:<BR>
<BR>
(when (class-indexedp-by-name 'idx-five)<BR>
(defclass idx-five ()<BR>
((slot1 :initarg :slot1 :initform 1 :accessor slot1 :index t)<BR>
(slot2 :initarg :slot2 :initform 2 :accessor slot2)<BR>
(slot3 :initarg :slot3 :initform 3 :accessor slot3 :index t))<BR>
(:metaclass persistent-metaclass))<BR>
(disable-class-indexing 'idx-five :errorp nil)<BR>
(setf (find-class 'idx-five) nil))<BR>
<BR>
(defclass idx-five ()<BR>
((slot1 :initarg :slot1 :initform 1 :accessor slot1 :index t)<BR>
(slot2 :initarg :slot2 :initform 2 :accessor slot2)<BR>
(slot3 :initarg :slot3 :initform 3 :accessor slot3 :index t))<BR>
(:metaclass persistent-metaclass))<BR>
<BR>
which is really hideous, handles the problem and makes the test <BR>
correctly idempotent under all circumstances.<BR>
<BR>
I suspect Ian Eslick may have some way of simplifying this last bit;<BR>
when he comes up for air from his current work we will discuss it.<BR>
<BR>
AFAIK, the latest release now awaits only addition tests on other (non SBCL/Linux)<BR>
systems and the documentation of the class indexing that I have promised to Ian<BR>
but not yet written.<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
----<BR>
Robert L. Read, PhD read &T robertlread.net<BR>
Consider visiting Progressive Engineering: http://robertlread.net/pe<BR>
In Austin: 912-8593 "Think globally, Act locally." -- RBF<BR>
<BR>
<BR>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>