[elephant-devel] CCL omittance in new schema code?
Leslie P. Polzer
sky at viridian-project.de
Mon May 4 06:53:58 UTC 2009
It seems that CCL is more liberal/comprehensive than other Lisps in
its usage of MAKE-INSTANCES-OBSOLETE. I haven't dived further into
this but the following patch fixes the issue specifically for OpenMCL:
diff -rN -u old-elephant-1.0/src/elephant/classes.lisp
new-elephant-1.0/src/elephant/classes.lisp
--- old-elephant-1.0/src/elephant/classes.lisp 2009-05-04 08:47:38.533508088 +0200
+++ new-elephant-1.0/src/elephant/classes.lisp 2009-05-04 08:47:39.830174415 +0200
@@ -364,6 +364,20 @@
;; (unless (match-schemas (%class-schema class) current-schema))
(prog1
(call-next-method)
+ ;; OpenMCL seems to make additional instances of differing types obsolete.
+ ;; Let's use a high-level approach until we have figured out how to handle this
+ ;; properly.
+ #+openmcl
+ (progn
+ (unless (schema-predecessor current-schema)
+ ;; make sure the class schema is up to date
+ (synchronize-stores-for-class (class-of instance)))
+ (let ((schema-predecessor (schema-predecessor current-schema)))
+ (when schema-predecessor
+ (let ((prior-schema (get-controller-schema sc schema-predecessor)))
+ (assert (and current-schema prior-schema))
+ (upgrade-db-instance instance current-schema prior-schema
property-list)))))
+ #-openmcl
(let ((prior-schema (aif (schema-predecessor current-schema)
(get-controller-schema sc it)
(error "If the schemas mismatch, a derived controller
schema should have been computed"))))
If no one objects within the next few days I will push it.
Leslie
--
http://www.linkedin.com/in/polzer
More information about the elephant-devel
mailing list