[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 14:33:47 UTC 2009
> Did you do this with a clean (i.e. empty) db?
Yes.
It seems like the error raises only when I pass a undefined class name
for the defpclass macro.
ex:
1. Compile and load this file.
<file>
(eval-when (:compile-toplevel :load-toplevel :execute)
(asdf:oos 'asdf:load-op :elephant))
(in-package :cl-user)
(defpackage :test (:use :cl :elephant))
(in-package :test)
(open-store '(:BDB "/home/tomo/src/lisp/test/db/"))
(defpclass qhfbljq () ((slot1 :accessor slot1)))
</file>
; => Raises this error
; There is no class named TEST::QHFBLJQ.
; [Condition of type SIMPLE-ERROR]
2. Manually evaluate this sexp.
(defpclass qhfbljq () ((slot1 :accessor slot1)))
; => works
3. After that, compiling and loading the same file works fine.
(But if I change the class name to undefined one, it raises the same error.)
Tomo
On Thu, May 7, 2009 at 10:52 PM, Leslie P. Polzer
<sky at viridian-project.de> wrote:
> On Thu, May 07, 2009 at 09:51:27PM +0900, Tomo Matsumoto wrote:
>
>> 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}>)
>
> This works for me, but I recognize this error.
>
> Did you do this with a clean (i.e. empty) db?
>
> Leslie
>
> _______________________________________________
> 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