I worked on this project with Clojure, so they may be willing to help diagnose.
I'll be looking into this later this month when I upgrade the running server
and add some features to that old project I mentioned.  -Ian

That would be cool, as I'm not comfortable with diving too deep into CCL's CLOS implementation.

I've found what happens: if you re-define PERSISTENT-METACLASS (e.g. (load "metaclasses.lisp") ) then classes of that metaclass lose their slots (CLASS-SLOTS returns NIL) and, perhaps, superclasses too, until you redefine them or their parents.

finalize-inheritance doesn't help: it looks like CCL thinks that classes are finalized while in fact their content is wiped out.

But what exactly happens with classes when their metaclass is redefined... I guess this question is better addressed by guys who wrote that CLOS implementation.

...

We trigger this problem because we force re-loading dynamic libraries via ASDF:

(defmethod operation-done-p ((o load-op) (c elephant-c-source))
   nil)

So, (asdf:oos 'asdf:load-op :elephant-tests) load Elephant system once.
Then when you work with a certain backend Elephant system it loaded once more by that backend's system definition, and ASDF thinks that operation is not done, so it loads both dynamic library and everything which depends on it, which includes metaclasses.lisp, so PERSISTENT-METACLASS is redefined and it fries all PERSISTENT-OBJECT subclasses.

I've tweaked method above changing NIL to T, in this case it passes almost all tests:

 Did 508 checks.
    Pass: 507 (99%)
    Skip: 0 ( 0%)
    Fail: 1 ( 0%)

 Failure Details:
 --------------------------------
 LIST-OF-STRINGS-RANDOM []:
      Unexpected Error: #<CCL::ARRAY-ELEMENT-TYPE-ERROR #x302001B44E8D>
NIL doesn't match array element type of <some weird unicode characters here>

...

I think it is funny that current versions of two out of two major open source CL implementations have CLOS too broken to run Elephant. Perhaps they should include Elephant into their regression tests lol


_______________________________________________
elephant-devel site list
elephant-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/elephant-devel

Reply via email to