Re: Literate files and ASDF
C Y <[email protected]> Tue, 19 Jun 2007 18:05:22 -0700 (PDT)
| Newsgroups | gmane.lisp.cclan.general |
|---|---|
| Message-ID | <[email protected]> |
Well, I got the :chunk part working. Now I have hit another problem,
and this one might be a bit more interesting.
In the world of literate programming, there are cases where two or more
source code files are contained in one literate document, and are
extracted by specifying the different root nodes corresponding to the
top level chunk of the respective files. In practice, that means
things like the following can occur:
(defsystem #:lisp-env
:depends-on (:asdf-literate)
:components
((:module "ENVIRONMENT-SETUP"
:pathname #.(make-pathname :directory '(:relative "src"
"lisp-env"))
:components
((:cl-pamphlet "axiom-lisp" :chunk "axiom-package.lisp")
(:cl-pamphlet "axiom-lisp")))))
While this is a valid literate pamphlet arrangement, it turns out to
break (for starters) ASDF's method of identifying duplicate component
definitions.
If I'm not mistaken, this is a rather serious collision with
assumptions made in ASDF. I might be able to specialize find-component
somehow or other to account for the name + chunk being the actual
unique identification, but even if I could there are calls to
find-component in two places that would be trouble - transverse and
parse-component-form.
Technically, transverse is a method and can therefore be specialized.
Practically however, it seems to be a rather large collection of code
and simply copying most of it over into a new method just seems
anti-lisp, somehow. There is a note in the file saying its current
structure is due to a Clisp limitation that I understand no longer
applies - would it be acceptable to break it up using methods?
The other case, parse-component-form, is a defun and as such not
subject to specialization.
Has anyone ever tried something like this before? I'm assuming because
I need to supply a third argument to find-component there would need to
be changes at the various calling points as well - is that incorrect?
If I'm right about the changes needed to make this work, is it a
generalization that would be worth folding back into asdf or should it
be its own package?
Cheers, and thanks.
CY
____________________________________________________________________________________Ready for the edge of your seat?
Check out tonight's top picks on Yahoo! TV.
http://tv.yahoo.com/
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/