On Thu, Feb 21, 2013 at 10:04 AM, Attila Lendvai <[email protected]> wrote: > dear asdf devels, > > i want to conditionally compile and load some lisp files on-demand at > runtime, and i would like to use the asdf machinery for that. the set > of files are not known at development time. > > the code in question is load-resource-file here: > > http://common-lisp.net/cgi-bin/darcsweb.cgi?r=cl-l10n-cl-l10n;a=headblob;f=/src/load-locale.lisp > > the current implementation is broken on asdf3 due to the assert (and a > kludge in general): > > (defun load-resource-file (resource-file) > (bind ((output-files (asdf:output-files (make-instance 'asdf::compile-op) > (make-instance > 'asdf:cl-source-file :pathname resource-file :parent (asdf:find-system > :cl-l10n))))) > (assert (length= 1 output-files)) > (bind ((output-file (first output-files))) > (ensure-directories-exist output-file) > (when (or (not (cl-fad:file-exists-p output-file)) > (> (file-write-date resource-file) > (file-write-date output-file))) > (compile-file resource-file :output-file output-file)) > (load output-file)))) > > any help, pointers, thoughts are welcome! > I had code that looked just like that in cl-launch, now also copied to exscribe (see compile-and-load-file in exscribe.lisp). I suppose I should make it part of asdf/lisp-build even though asdf/defsystem itself won't use it. Is it OK for you to depend on a recent asdf-driver?
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Any sufficiently advanced bug is indistinguishable from a feature. — Rich Kulawiec _______________________________________________ asdf-devel mailing list [email protected] http://lists.common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel
