[Openmcl-devel] clsql regression with slot-value

Osei Poku osei.poku at gmail.com
Tue Mar 10 09:44:57 PDT 2009


On Mar 10, 2009, at 5:52 AM, Gary Byers wrote:
>
> I think that 1.2 and earlier may have treated "... :type nil ..."
> in a slot specification as if the :type option was missing (and
> therefore defaulted to T.)  That isn't correct, though it did
> mask the fact that saying that a slot has a type of NIL is almost
> certainly incorrect (even if it's well-defined.)
>
> Really saying that a slot has type NIL is obscure enough that
> I wouldn't be too upset if DEFCLASS warned about it.
>
> I would guess that that the author(s) of CLSQL didn't really
> intend to say that the slot in question had type NIL ...

No, I would think not.  In fact, I can't even find the place where the  
slot type is specified.  CLSQL does do some extreme acrobatics with  
metaclasses and calculating effective slots and so on so it's hard to  
know where exactly this may be happening.  I also sent a similar email  
to the CLSQL mailing list (I was not sure what the rules were about  
cross-posting :/ ).

The superclass is simply (deceptively) defined as follows:
(defclass standard-db-object ()
   ((view-database :initform nil :initarg :view-database :reader view- 
database
     :db-kind :virtual))
   (:metaclass standard-db-class)
   (:documentation "Superclass for all CLSQL View Classes."))

But as you can imagine, there are specializations on all kinds of  
obscure MOP methods on the STANDARD-DB-CLASS.  I can't find any  
special things that are done to modify the type of the slot.

>
> On Tue, 10 Mar 2009, Osei Poku wrote:
>
>> Hello,
>>
>> After upgrading to CCL 1.3, I am now getting this error.   Inspecting
>> the slot definition of VIEW-DATABASE of the STANDARD-DB-OBJECT (the
>> direct superclass of FAILDATA-TABLE and the source of that particular
>> slot) confirms that the expected type of that slot is infact NIL.   
>> Any
>> ideas?  Prior to upgrading, I never saw anything like this.
>>
>> The value #<MYSQL-DATABASE localhost/twdb_lsi_design1_block1/opoku
>> OPEN #x300051D6604D>, derived from the initarg :VIEW-DATABASE, can  
>> not
>> be used to set the value of the slot CLSQL-SYS::VIEW-DATABASE in
>> #<FAILDATA-TABLE #x300052859B1D>, because it is not of type NIL.
>>  [Condition of type CCL::BAD-SLOT-TYPE-FROM-INITARG]
>>
>> The CCL version is Version 1.3-RC1-r11804M  (LinuxX8664)
>>
>> Thanks,
>>
>> Osei
>> _______________________________________________
>> Openmcl-devel mailing list
>> Openmcl-devel at clozure.com
>> http://clozure.com/mailman/listinfo/openmcl-devel
>>
>>




More information about the Openmcl-devel mailing list