[elephant-devel] Re: MOP and initforms

Ian Eslick eslick at media.mit.edu
Thu Mar 6 17:17:50 UTC 2008


You shouldn't be using any of the controllers in contrib/eslick, those  
are in-progress experiments.  Which version of the source tree are you  
using?  This code shouldn't be loaded unless you are doing it  
explicitly.  You should just be loading elephant.asd.

Ian

On Mar 6, 2008, at 12:12 PM, kmkaplan+elephant at ded.kim-minh.com wrote:

> Alex Mizrahi writes:
>
>> LPP> I should have added that I'm talking about a schema evolution  
>> thing
>> LPP> here, i.e. the situation concerns slots *added* to a class.
>>
>> LPP> The slots of instances of such a class are unbound instead of  
>> being
>> LPP> assigned their initform, if any.
>>
>> i agree with you -- this unbound thing is totally weird.
>>
>> or it's not relevant anymore with fancy stuff Ian is working on?
>
> I do not really know if this is related but I just started using
> elephant and had to apply the following patch to follow the
> description in 7.5.1 Introduction to Slots.
>
> diff -rN -u old-elephant/src/contrib/eslick/db-acache/acache- 
> controller.lisp new-elephant/src/contrib/eslick/db-acache/acache- 
> controller.lisp
> --- old-elephant/src/contrib/eslick/db-acache/acache-controller.lisp	 
> 2008-02-29 17:02:22.000000000 +0100
> +++ new-elephant/src/contrib/eslick/db-acache/acache-controller.lisp	 
> 2008-03-03 15:07:26.000000000 +0100
> @@ -78,7 +78,7 @@
>   (multiple-value-bind (val valid?) (map-value (controller-slots sc)  
> (fast-key (oid instance) name))
>     (if valid?
> 	val
> -	(error "Slot ~A unbound in ~A" name instance))))
> +	(slot-unbound (class-of instance) instance name))))
>
> (defmethod persistent-slot-writer ((sc acache-store-controller)  
> value instance name)
>   (declare (optimize (speed 3) (safety 1)))
> diff -rN -u old-elephant/src/contrib/eslick/db-prevalence/prev- 
> slots.lisp new-elephant/src/contrib/eslick/db-prevalence/prev- 
> slots.lisp
> --- old-elephant/src/contrib/eslick/db-prevalence/prev-slots.lisp	 
> 2008-02-29 17:02:22.000000000 +0100
> +++ new-elephant/src/contrib/eslick/db-prevalence/prev-slots.lisp	 
> 2008-03-03 15:07:57.000000000 +0100
> @@ -26,7 +26,7 @@
>   (multiple-value-bind (value exists?)
>       (read-controller-slot (oid instance) name sc)
>     (if exists? value
> -	(error 'unbound-slot :instance instance :name name))))
> +	(slot-unbound (class-of instance) instance name))))
>
> (defmethod persistent-slot-writer ((sc prev-store-controller) value  
> instance name)
>   (write-controller-slot value (oid instance) name sc))
> diff -rN -u old-elephant/src/db-bdb/bdb-slots.lisp new-elephant/src/ 
> db-bdb/bdb-slots.lisp
> --- old-elephant/src/db-bdb/bdb-slots.lisp	2008-02-29  
> 17:02:22.000000000 +0100
> +++ new-elephant/src/db-bdb/bdb-slots.lisp	2008-03-03  
> 15:01:41.000000000 +0100
> @@ -36,10 +36,7 @@
> 				    key-buf value-buf
> 				    :transaction (my-current-transaction sc))))
>       (if buf (deserialize buf sc)
> -	  #+cmu
> -	  (error 'unbound-slot :instance instance :slot name)
> -	  #-cmu
> -	  (error 'unbound-slot :instance instance :name name)))))
> +	  (slot-unbound (class-of instance) instance name)))))
>
> (defmethod persistent-slot-writer ((sc bdb-store-controller) new- 
> value instance name)
>   (with-buffer-streams (key-buf value-buf)
> diff -rN -u old-elephant/src/db-clsql/sql-controller.lisp new- 
> elephant/src/db-clsql/sql-controller.lisp
> --- old-elephant/src/db-clsql/sql-controller.lisp	2008-02-29  
> 17:02:22.000000000 +0100
> +++ new-elephant/src/db-clsql/sql-controller.lisp	2008-03-03  
> 15:06:13.000000000 +0100
> @@ -772,7 +772,7 @@
>        sc)
>     (if existsp
> 	v
> -	(error  'unbound-slot :instance instance :name name))))
> +	(slot-unbound (class-of instance) instance name))))
>
> (defmethod persistent-slot-boundp ((sc sql-store-controller)  
> instance name)
>   (if (sql-from-root-existsp
> diff -rN -u old-elephant/src/db-postmodern/pm-controller.lisp new- 
> elephant/src/db-postmodern/pm-controller.lisp
> --- old-elephant/src/db-postmodern/pm-controller.lisp	2008-03-03  
> 11:28:20.000000000 +0100
> +++ new-elephant/src/db-postmodern/pm-controller.lisp	2008-03-03  
> 15:09:19.000000000 +0100
> @@ -265,7 +265,7 @@
>                    (persistent-slot-collection-of sc))
>       (if existsp
>           v
> -          (error 'unbound-slot :instance instance :name name)))))
> +	  (slot-unbound (class-of instance) instance name)))))
>
> (defmethod persistent-slot-boundp ((sc postmodern-store-controller)  
> instance name)
>   (with-controller-for-btree (sc)
>
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel




More information about the elephant-devel mailing list