Hi Eric,
(Apologies for the belated reply, just saw the message today.)
On Mon, Jun 14, 2010 at 9:26 PM, Erik Huelsmann ehuels@gmail.com wrote:
Hi William,
Thanks for your report below!
On Mon, Jun 14, 2010 at 4:09 AM, William Wadsworth will.wadsworth.10@gmail.com wrote:
Hi.
The following transcript demonstrates the problem.
--- BEGIN Armed Bear Common Lisp 0.20.0 Java 1.6.0_20 Sun Microsystems Inc. Java HotSpot(TM) Client VM Low-level initialization completed in 0.667 seconds. Startup completed in 4.849 seconds. Type ":help" for a list of available commands. CL-USER(1): (defstruct x a b c) X CL-USER(2): (slot-value (make-x :a 10) 'a) #<THREAD "interpreter" {118958E}>: Debugger invoked on condition of type UNDEFINED-FUNCTION The function SLOT-VALUE is undefined.
Well, you seem to have identified an issue here: you're correct our MOP isn't fully complete, but it's not *that* bad. The function is defined in clos.lisp. However, loading of that file happens on the first use of one of the functions inside it. But: there's no trigger installed on the function to trigger autoloading.
It seems we need a list of all functions exported from clos.lisp in order to fix up the auto-loading triggers. Could you create a list like that?
I don't know whether I read you clearly, but using the following snippet I got the (manually flattened) results below it:
(let ((file #P"clos.lisp")) (with-open-file (in file) (loop for form = (read in nil nil) while form when (and (listp form) (eq (car form) 'cl:export)) nconcing (cdr form))))
CLASS-PRECEDENCE-LIST CLASS-SLOTS COMPUTE-APPLICABLE-METHODS COMPUTE-APPLICABLE-METHODS-USING-CLASSES SLOT-DEFINITION-ALLOCATION SLOT-DEFINITION-INITARGS SLOT-DEFINITION-INITFORM SLOT-DEFINITION-INITFUNCTION SLOT-DEFINITION-NAME
(Meanwhile, let me see what I can achieve by modifying autoloads.lisp and/or AutoLoads.java?)
In order to see if a small commit would help you out, I added this form to the beginning of your transcript:
(autoload 'slot-value "clos") --> T
Turns out that's not all that's required: the next failure I ran into is that the function either the function SLOT-VALUE is missing a special case for structures, or SLOT-VALUE-USING-CLASS is missing a method for structure classes; the error was "No applicable method"...
Looks like there's no workaround, but maybe there's a quick patch. I'll need to look into that a bit more. I thought I'd report you my findings first.
Thanks again for reporting and welcome to ABCL!
Thanks for the effort you and the rest of the team are putting into it.
Bye,
Erik.
Martin.