Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
avodonosov opened this issue Jan 3, 2013 · 9 comments

Comments

Projects
None yet
2 participants
@avodonosov
Copy link

commented Jan 3, 2013

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.

@quicklisp

This comment has been minimized.

Copy link
Owner

commented Jan 3, 2013

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

@avodonosov

This comment has been minimized.

Copy link
Author

commented Jan 3, 2013

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?

@quicklisp

This comment has been minimized.

Copy link
Owner

commented Jan 3, 2013

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.

@avodonosov

This comment has been minimized.

Copy link
Author

commented Jan 3, 2013

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

@avodonosov

This comment has been minimized.

Copy link
Author

commented Jan 3, 2013

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

This comment has been minimized.

Copy link
Author

commented Jan 7, 2013

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

This comment has been minimized.

Copy link
Author

commented Jan 2, 2014

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

This comment has been minimized.

Copy link
Author

commented Sep 12, 2014

@avodonosov

This comment has been minimized.

Copy link
Author

commented Sep 12, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.