[asdf-devel] Patches for ASDF2 for translation function

Mark Evenson evenson at panix.com
Mon Apr 5 12:52:08 UTC 2010


On 3/29/10 11:33 AM, Mark Evenson wrote:
[…]

>> I'd favor either a keyword argument or :function as a magic marker
>> to be inserted in FIRST position, followed by a function designator
>> (and additionally, parameters to curry?). Unless of course, you
>> symmetrically accept a FUNCTION in first position to denote a
>> "recognize if this matching rule applies".
>
>
> I would think that we want to preserve the current ability for the
> user to vistually scan down the list of translations to determine
> what should match, so I would favor going for your second proposal.
> It doesn't make sense that there be a match predicate paired with a
> translation pathname right?  So the two new possibilities for output
> translation lists would be:
>
> ("/**/foo/*.*" (:function FOO-OUTPUT-TRANSLATION))
> ((:function BAR-PATHNAME-P) (:function BAR-OUTPUT-TRANSLATION))

Attached is a patch against ASDF that allows a user specified function 
to take the place of TRANSLATE-PATHNAME as the ASDF2 output translation 
function.

Additionally it adds an ABCL specific extension to ASDF2 that uses this 
ability by providing the following translations by default

   (#p"jar:file:/**/*.jar!/**/*.*" (:function translate-jar-pathname))
   (#p"/:jar:file/**/*.*" (:user-cache #p"**/*.*")))

that will map all ASDF loads from jar pathnames to an output location 
under the per user cache location.  This will allow the loading of ASDF 
systems packaged in jar files which first compiles and then loads FASLs 
to the local filesystem.

To run this with ABCL you will need to build a custom build of ABCL with 
the attached patch which is currently necessary to OPEN a jar pathname. 
  This patch is part of a large set of modifications that allow ABCL to 
open a pathname specified as a url, that I am developing and testing as 
a unit.  These modiictions will be placed in ABCL trunk soon, but first 
I need to add create more unit tests for the introduced functionality 
and implement a few more suggestions (like URI encoding functions).

I did not implement Faré's suggestion of including a syntax for a 
predicate function as the first argument for a output translation pair, 
because I couldn't come up with a use case in which the current default 
function PATHNAME-MATCH-P would not work.  If someone can come up with 
such a case, or this deficiency prevents ASDF from accepting this patch, 
I can have a go at it again.

-- 
"A screaming comes across the sky.  It has happened before, but there
is nothing to compare to it now."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asdf-translation-function-abcl-20100406.diff
Type: text/x-diff
Size: 9117 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20100405/5a512463/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: abcl-url-pathname-20100406.diff
Type: text/x-diff
Size: 59287 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20100405/5a512463/attachment-0001.diff>


More information about the asdf-devel mailing list