quicklisp-client icon indicating copy to clipboard operation
quicklisp-client copied to clipboard

systems with dot in the name installed/updated by CCL can not be ql:quickload'ed by other lisps (e.g. ECL)

Open avodonosov opened this issue 12 years ago • 9 comments

I sometimes encounter problems like this: http://cl-test-grid.appspot.com/blob?key=904796

The error says it can't find the "hu.dwim.stefil.asd" file. The file exists, but of course without slashes before the dots in the name.

I digged this problem. Turns out quicklisp/dists/quicklisp/installed/systems/hu.dwim.stefil.txt contains the following line:

dists/quicklisp/software/hu.dwim.stefil-20120909-darcs/hu\.dwim\.stefil.asd

As you see, the lisp trying to ql:quickload the system and failing is ECL. I think when system was installed first time and the installed/systems/hu.dwin.stefil.txt file was created, it was also ECL.

But I can't reproduce this problem. Trying to install fresh quicklisp and load the system, but installed/systems/hu.dwin.stefil.txt is created and contains path without slashes.

I saw this problem many times, it exists for sure. Just don't know the reproducible test case.

avodonosov avatar Jan 03 '13 17:01 avodonosov

Clozure CL normally escapes namestrings with a dot in the pathname-name. If you installed initially with CCL, it might cause this issue.

quicklisp avatar Jan 03 '13 17:01 quicklisp

I think I remember. The original install was by ECL, but the ql:update-all-dists and ql:update-client was run by CCL.

So, how do you think it should be handled? Is it a bug in quicklisp, bug in CCL or something else? What workaround is possible?

avodonosov avatar Jan 03 '13 17:01 avodonosov

I'm not really sure. I think it's a bug in Quicklisp. It should use some more neutral representation of the namestring instead of taking it verbatim.

quicklisp avatar Jan 03 '13 17:01 quicklisp

CCL has an enhancement request to not escape periods in file names: http://trac.clozure.com/ccl/ticket/632

avodonosov avatar Jan 03 '13 20:01 avodonosov

And here is what rme suggests in a comment to that ticket:

"When you want a namestring that you can pass to a foreign function or external program, the thing to use is ccl:native-translated-namestring."

Can it be used in quicklisp?

avodonosov avatar Jan 03 '13 22:01 avodonosov

Another example to consider is xcvb-driver functions:


(defun native-namestring (x)
  "From a CL pathname, a namestring suitable for use by the OS shell"
  (let ((p (pathname x)))
    #+clozure (let ((*default-pathname-defaults* #p"")) (ccl:native-translated-namestring p)) ; see ccl bug 978
    #+(or cmu scl) (ext:unix-namestring p nil)
    #+sbcl (sb-ext:native-namestring p)
    #-(or clozure cmu sbcl scl) (namestring p)))

(defun parse-native-namestring (x)
  "From a native namestring suitable for use by the OS shell, a CL pathname"
  (check-type x string)
  #+clozure (ccl:native-to-pathname x)
  #+sbcl (sb-ext:parse-native-namestring x)
  #-(or clozure sbcl) (parse-namestring x))

https://github.com/fare/xcvb/blob/master/driver.lisp

avodonosov avatar Jan 07 '13 11:01 avodonosov

This bug troubles me. I can never have CCL to be used before other lisps. When I forgot about this CCL installs libraries with . in file name and other lisps can not load the libraries. I must to remove and re-install Quicklisp.

Therefore I am willing to fix it.

Would you accept a patch?

avodonosov avatar Jan 02 '14 09:01 avodonosov

Another relevant problem report: https://groups.google.com/forum/#!topic/quicklisp/hCvLyqXI-C4

avodonosov avatar Sep 12 '14 21:09 avodonosov

The fact that pathnames stored by quicklisp are relative pathnames, simplifies the fix. The relative pathname components may be always joined with '/' when converted to string, and parsed accordingly.

This solution may be borrowed from ASDF, it has functions unix-namestring and parse-unix-namestring to handle exactly this - work with relative pathnames.

avodonosov avatar Sep 12 '14 21:09 avodonosov