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

cl-project:make-project fails on windows using sbcl #36

Open
icepic1984 opened this issue Jan 27, 2020 · 0 comments
Open

cl-project:make-project fails on windows using sbcl #36

icepic1984 opened this issue Jan 27, 2020 · 0 comments

Comments

@icepic1984
Copy link

Hi!

On windows using sbcl (Version 2.0.0) cl-project:make-project fails with

Error opening #P"C:/Binary/./quicklisp2/dists/quicklisp/software/cl-project-20190521-git/skeleton/eleton.asd"

I think the problem is inside the relative-path function in make-skeleton-from-directory.

(defun make-skeleton-from-directory (directory)
  (flet ((relative-path (path)
           (pathname
            (subseq
             (namestring path)
             (length (namestring directory))))))
    (make-skeleton
     directory
     (maptree (lambda (file)
                (make-template-file (relative-path file)))
              directory))))

On my system directory , which originate from a call to (asdf:system-relative-pathname :cl-project "skeleton") is set to C:/Binary/./quicklisp2/dists/quicklisp/software/cl-project-20190521-git/skeleton/ (see the "." between binary and quicklisp), while path is set to C:/Binary/quicklisp2/dists/quicklisp/software/cl-project-20190521-git/skeleton/skeleton.asd. Therefore the subseq expression will cut away two characters of the namestring of path. Replacing the subseq expression with the following code fixes the problem:

 (pathname
   (subseq
     (namestring path)
        ( - (length (namestring directory)) 2)))
           ))

Obviously this is not a real fix. I think the root cause is, that asdf:system-relative-pathname returns a "." inside the pathname but i don't have a clue why it does this.

Any idea how to fix this problem? I can imagine, that doing string operation on pathes is not the best idea but i am to new to lisp to come up with a better idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant