On 3/9/10 Mar 9 -5:49 PM, Faré wrote:
Yes, it hasn't been documented so far. My bad. At least it now has a well-defined meaning, as opposed to the previous mess. 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.
This case worries me. It seems to require that every system definer have a strongish sense of the internals of ASDF, and will give odd results when someone writes
(:cl-source-file "foo.lisp")
ASDF will want "foo.lisp.lisp".
I know /why/ you got to this, and if you think about ASDF "from the inside" it makes sense, but "from the outside" I don't think it makes sense.
Would it be so bad to change this to
"when the source-file-type of a component is a string, then a component-name containing a period will cause ASDF to emit an error."
This will cause the vast majority of simple cases to behave sensibly, IMO. It has the effect of making it hard to put a period in a file name. But since embedding periods in filenames in the CL pathname systems is problematic, I'd prefer making the user specifically indicate that s/he is good and bloody sure s/he wants that period to be part of the :name component by imposing some cumbersome quoting requirement. Perhaps something like "fooYESIBLOODYWELLMEANIT.bar" ;-)
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.
Best, Robert