[elephant-devel] Defining a persistent class with a slot with an accessor invokes an error like "There is no class named CLASS-NAME."
Tomo Matsumoto
tomoyuki28jp at gmail.com
Thu May 7 12:51:27 UTC 2009
With the latest codes from darcs, defining a persistent class with a
slot with an accessor invokes an error like "There is no class named
CLASS-NAME.".
Here is an example.
(open-store '(:BDB "/path/to/db"))
(defpclass new-class () ((slot1 :accessor slot1)))
; There is no class named NEW-CLASS.
; [Condition of type SIMPLE-ERROR]
;
; Restarts:
; 0: [ABORT] Return to SLIME's top level.
; 1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "worker"
RUNNING {A99C9E9}>)
;
; Backtrace:
; 0: (SB-PCL::REAL-ADD-METHOD #<STANDARD-GENERIC-FUNCTION SLOT1 (1)>
#<SB-MOP:STANDARD-READER-METHOD SLOT1, slot:SLOT1, ((CLASS
#<PERSISTENT-METACLASS NEW-CLASS>)) {A9A2B31}> NIL)
; 1: (SB-PCL::FIX-SLOT-ACCESSORS #<PERSISTENT-METACLASS NEW-CLASS>
(#<ELEPHANT::PERSISTENT-DIRECT-SLOT-DEFINITION SLOT1>) SB-PCL::ADD
NIL)
; 2: ((SB-PCL::FAST-METHOD SHARED-INITIALIZE :AFTER
(SB-PCL::STD-CLASS T)) #(17 NIL 5 NIL) #<unavailable argument>
#<PERSISTENT-METACLASS NEW-CLASS> T)[:EXTERNAL]
; 3: ((LAMBDA (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL.
SB-PCL::.ARG0. SB-PCL::.ARG1. SB-INT:&MORE SB-PCL::.DFUN-MORE-CONTEXT.
SB-PCL::.DFUN-MORE-COUNT.)) #<unused argument> #<unused argument>
#<PERSISTENT-METACLASS NEW-CLASS> T -304735685 10)
; 4: ((SB-PCL::FAST-METHOD SHARED-INITIALIZE :AROUND
(PERSISTENT-METACLASS T)) #<unavailable argument> #<unavailable
argument> #<unavailable argument> #<unavailable argument>)[:EXTERNAL]
; 5: ((SB-PCL::FAST-METHOD MAKE-INSTANCE (CLASS)) #<unavailable
argument> #<unavailable argument> #<STANDARD-CLASS
PERSISTENT-METACLASS>)[:EXTERNAL]
; 6: ((SB-PCL::FAST-METHOD SB-MOP:ENSURE-CLASS-USING-CLASS (NULL T))
#<unavailable argument> #<unavailable argument> NIL
NEW-CLASS)[:EXTERNAL]
; 7: (SB-PCL::REAL-LOAD-DEFCLASS NEW-CLASS PERSISTENT-METACLASS NIL
((:NAME SLOT1 :READERS (SLOT1) :WRITERS (#) ...)) NIL (SLOT1) ((SETF
SLOT1)) (SLOT1) NIL NIL)
; 8: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SB-PCL::LOAD-DEFCLASS (QUOTE
NEW-CLASS) (QUOTE PERSISTENT-METACLASS) (QUOTE NIL) (LIST (LIST* :NAME
# :READERS # :WRITERS ...)) (LIST) ...) #<NULL-LEXENV>)
; 9: (SB-INT:SIMPLE-EVAL-IN-LEXENV (LET NIL (SB-PCL::LOAD-DEFCLASS
(QUOTE NEW-CLASS) (QUOTE PERSISTENT-METACLASS) (QUOTE NIL) (LIST #)
(LIST) ...)) #<NULL-LEXENV>)
; 10: (SB-INT:SIMPLE-EVAL-IN-LEXENV (EVAL-WHEN (:LOAD-TOPLEVEL
:EXECUTE) (LET NIL (SB-PCL::LOAD-DEFCLASS # # # # # ...)))
#<NULL-LEXENV>)
; 11: (SB-INT:SIMPLE-EVAL-IN-LEXENV (DEFPCLASS NEW-CLASS NIL ((SLOT1
:ACCESSOR SLOT1))) #<NULL-LEXENV>)
Is that a bug in elephant?
I use SBCL 1.0.18 on Ubuntu Linux 9.04 32bit.
Tomo
More information about the elephant-devel
mailing list