[Asdf-devel] native-namestring in asdf/cache:normalize-namestring?
Orivej Desh
c at orivej.org
Tue Nov 25 19:18:53 UTC 2014
> 1. REPLICATION:
>
> Would you please let me know how to replicate this error?
>
> I was hoping that (ql:quickload "libssh2") would get this for me, but
> not in my current client.
I can replicate it reliable by cleaning (renaming, actually)
~/.cache/common-lisp and loading libssh2. Is there another way
to ensure that COMPUTE-ACTION-STAMP is called with :JUST-DONE NIL? (I
don't understand how exactly this affects JUST-DONE, but it does.)
* * *
> I'm not convinced that these pathnames with invalid namestring would
> have a valid native-namestring (did you try?)
They have:
(uiop:native-namestring (make-pathname :name "a.b" :type nil))
=> "a.b"
> using native-namestring in asdf/cache:normalize-namestring would be
> quite impractical, since the function CL:FILE-WRITE-DATE that we
> subsequently use requires a Lisp namestring.
I anticipated this would be a problem. So, NATIVE-NAMESTRING is not acceptable.
> I believe this is a bug in CFFI, and ASDF cannot do much about it. I'm
> copying the CFFI-devel mailing-list.
I hoped that ASDF would smooth out working with pathnames for
CFFI-GROVEL as much as possible; providing UIOP seems to be this much.
> (defun exe-filename (defaults)
> (let ((defaults (uiop:ensure-pathname defaults :namestring :native :want-non-wild t :want-file t))) ;; YMMV
> (uiop:subpathname defaults (uiop:parse-unix-namestring (pathname-name defaults) :type *exe-extension*)))
Thank you for this example.
If DEFAULTS is a pathname of an existing file, ENSURE-PATHNAME seems
unnecessary. Under this assumption, the following definition appears
equivalent:
(defun exe-filename (defaults)
(uiop:parse-unix-namestring (pathname-name defaults)
:type *exe-extension*
:defaults defaults))
(N.B. Neither definition prepends "./" to relative paths.)
More information about the asdf-devel
mailing list