[asdf-devel] :logical-hostname
Robert Goldman
rpgoldman at sift.info
Wed Mar 31 03:31:11 UTC 2010
On 3/30/10 Mar 30 -4:32 PM, james anderson wrote:
>
> On 2010-03-30, at 21:36 , Robert Goldman wrote:
>
>> On 3/30/10 Mar 30 -1:48 PM, james anderson wrote:
>>>
>>> On 2010-03-30, at 20:36 , Juan Jose Garcia-Ripoll wrote:
>>>
>>>>
>>>> I think I know roughly what Juanjo means here. In particular:
>>>>
>>>> 1. I don't like to have my systems use the ASDF API internally.
>>>> E.g.,
>>>> I will set up variables with pathnames, or use logical pathnames
>>>> in my
>>>> ASDF system definition files, so that my actual code doesn't have
>>>> to use
>>>> something like asdf:system-definition-pathname.
>>>>
>>>> 2. I have worked with people who don't use ASDF. If I observe
>>>> strictures like the ones I lay out in point 1, then those people can
>>>> write a simple load file that somehow initializes the logical
>>>> pathnames
>>>> and loads the code (how to do that is /their/ problem!) and then
>>>> they
>>>> can use my code just as I do. If I used calls like
>>>> asdf:system-definition-pathname, that would not be possible.
>>>>
>>>> So I think Juanjo's objectives here (or at least my
>>>> interpretation of
>>>> his objectives!) are reasonable.
>>>>
>>>> You got it right. I would extend the argument but I have to leave.
>>>> Perhaps tomorrow.
>>>
>>> ?
>>> one can do that now. without any changes to asdf and without any
>>> purity
>>> tests.
>>> so, he must be thinking of something in addition.
>>>
>>
>> Can you explain how to do this?
>
> i have found two ways to do this.
>
> a. put logical hosts on asdf's search path and unify the pathnames
> for found system definitions with them. this is semi-pure in that the
> mechanism is part of an extension[1] and hooks into an additional
> method for system instantiation, but, in principle, it has nothing to
> do with the hierarchal name mechanism. it uses the mappings cited[2]
> in the earlier message to implement the equivalent of binary
> locations in terms pathname translation patterns which match the
> output file type.
I think that this is the opposite of what Juanjo is proposing.
According to Juanjo, the population of the asdf:*central-registry*, and
the loading of system causes logical pathname hosts to be defined. What
you propose here is to define logical pathname hosts and use them to
help find and load systems.
>
> b. define a host anew for each system definition[3]. this uses [2] to
> root a host at a given location. by default that of the currently
> loaded file.
>
> ---
> [1] : http://github.com/lisp/de.setf.utility/blob/master/asdf/
> hierarchical-names.lisp#L274 (this uses on operator from [2].)
> [2] : http://github.com/lisp/de.setf.utility/blob/master/
> pathnames.lisp#L119
> [3] : http://github.com/lisp/de.setf.amqp/blob/master/amqp.asd#L36
BTW, any chance you could use tiny url or some other url shortener on
these github links? At least in my email client, they get line breaks
in the middle and thus broken....
This bit of code in [2] is very nice, by the way, seems to be just what
Juanjo is asking for, but with a slightly different API, yes?
More information about the asdf-devel
mailing list