Can you not index dependencies by method signature and have autoload load specify selected methods? Then the loading order is to alway load the generic function, if not already loaded, and then the file with the specific method.<div>

<br></div><div>-Alan<br><br><div class="gmail_quote">On Tue, Jul 31, 2012 at 11:56 AM, Erik Huelsmann <span dir="ltr"><<a href="mailto:ehuels@gmail.com" target="_blank">ehuels@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi all,<div><br></div><div><br></div><div>Today I've been playing around with ways to automatically extract symbols from our build to automate (most) of the autoloads.lisp maintenance. So, I've created a small adjustment to COMPILE-FILE which saves the top-level DEFUNs, DEFMETHODs and DEFGENERICs which have been compiled.</div>



<div><br></div><div>The result is interesting even in light of today's file: analysis shows we have several generic functions for which methods have been defined across multiple files. An example: we have definitions for PRINT-OBJECT in print-object.lisp, but also in java.lisp and format.lisp. This is a problem, because the autoloader has been instructed to load "print-object.lisp" only, when finding references to the print-object generic function.</div>



<div><br></div><div>My conclusion so far is that we need to be able to trigger auto-loading of more than one source file *and* that we need a way to determine in which order to load them: we'd typically want to load the file containing the DEFGENERIC before we load the one with the other method definitions. While the former isn't trivial (think threading) but doable, I'm still thinking how to achieve the latter.</div>



<div><br></div><div><br></div><div>So, why do we want autoloading at all? Well, we want to make sure we get a short start up time and to achieve that, we don't load the parts of the system that we don't need. How much extra time it would take to load the full system? I have no idea at this moment. (But we could experiment and code to that extent would be greatly appreciated!)</div>



<div><br></div><div>And why do I want to part with our current system? Well, from analysis of the DEFUN/DEFGENERIC/DEFMETHOD data (and thus excluding the DEFMACRO data) we have 2512 definitions each of which may be referenced by our users. Currently only a few hundred of them actually exist before the file gets autoloaded. Which ones will exist is hard to tell from the sources themselves. Maintaining the file is somewhat a trial and error process: if ABCL doesn't load without the autoloads, add them to the autoloads.lisp file. I'd like our process to be both more automatic and less trial and error.</div>


<div><br></div><div>[I started to write the above yesterday, but apparently didn't send it...]</div><div><br></div><div><br></div><div>Bye,</div><div><br></div><div><br></div><div>Erik.</div>
<br>_______________________________________________<br>
armedbear-devel mailing list<br>
<a href="mailto:armedbear-devel@common-lisp.net">armedbear-devel@common-lisp.net</a><br>
<a href="http://lists.common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel" target="_blank">http://lists.common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel</a><br>
<br></blockquote></div><br></div>