[asdf-devel] never ending component relative pathnames [2]

Faré fahree at gmail.com
Wed Mar 10 14:00:27 UTC 2010


>> These are not currently portably valid:
>> * module "./"
>
> => remove these entries.
> elsewhere it is described that "." should work.
> ? add entries for "." to the module and system lists?
>
As rpg says, I don't know where that "somewhere" is,
and I suspect it's bogus. If you want non-portable stuff,
you can use #p".".

I suppose I could add support for "." and maybe even ".."
to the component name parsing function. If there is an
outcry of demand from ASDF users, I will, but at present
that seems overkill to me.

>> * source test to be split between :file lisp module and :static-
>> file data file
>> * :file "file2.lisp" means #p"file2.lisp.lisp"
>> * :static-file "file2.lisp" means #p"file2.lisp"
>> * :file "module1-1/file3.lisp" means #p"module1-1/
>> file3.lisp.lisp" (assuming /)
>> * :static-file "module1-1/file3.lisp" means #p"module1-1/file3.lisp"
>
> ? == add a :static-file as a sibling to the :file component
> ? == add combinations for variations in the component name
>
add :static-file as a sibling, and note that various things behave
differently, since :file always adds .lisp to a specified string
whereas :static-file never adds anything (and neither ever substract).

>> * similarly for absolute path as a string.
> ? do not understand
We probably want to check that these work (at least on Unix):
"/foo/bar/baz.quux"

>> a- when the source-file-type of a component is NIL, then the file type
>> is read from the last /-separated component of the string as the last
>> dot-separated component (unless there's only one dot and  it's the
>> first character, in which case the type is NIL and that's the name).
>> b- when the source-file-type of a component is a string, then it will
>> be the type, and the last /-separated component of the string provides
>> the name.
>> c- when the source-file-type of a component is :DIRECTORY, then all
>> /-separated components of the string including the last one are
>> interpreted as directories.
>
> ? but not when it is a file or file specialization?
>
When it's a file, the previous to last components are interpreted as
directories, but the last is interpreted as a file name. When it's
a directory, all components are interpreted as directories.


>>> please describe the syntax for pathname pseudo-namestrings.
>>> i have added pathname specifications to the tests[3] which mirror
>>> clhs 19.3.1, but
>>> a. use '/' instead of ';' as the (relative)-directory-marker;
>>> b. follow the unix convention for "relative" rather than the logical
>>> pathname convention;
>>> c. exclude hosts
>>>
>>> is that the intended syntax?
>>>
>> Yes. Plus the fact that either a type is provided by the component
>> class,
>> or none is and the type is taken from the string.
>
> ? still no clear one this. please describe a few examples with the
> intended effective component pathname.
>
(:module "a/b/c.d") => (make-pathname :directory '(:relative "a" "b" "c.d"))
(:file "a/b/c.d") => (make-pathname :directory '(:relative "a" "b")
:name "c.d" :type "lisp"))
(:static-file "a/b/c.d") => (make-pathname :directory '(:relative "a"
"b") :name "c" :type "d"))
(:module "/a/b/c.d") => (make-pathname :directory '(:absolute "a" "b" "c.d"))
(:file "/a/b/c.d") => (make-pathname :directory '(:absolute "a" "b")
:name "c.d" :type "lisp"))
(:static-file "/a/b/c.d") => (make-pathname :directory '(:absolute "a"
"b") :name "c" :type "d"))


[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
Time and money spent in helping men to do more for themselves is far better
than mere giving. — Henry Ford




More information about the asdf-devel mailing list