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-jupyter fails on Windows if started on a different drive than it was installed on #47

Open
WetHat opened this issue Nov 8, 2018 · 2 comments

Comments

@WetHat
Copy link

WetHat commented Nov 8, 2018

When jupyter is started on a drive which is different from the drive where cl-jupyter was installed, the cl-jupyter kernel does not start any more on Windows. This failure is caused by registration code in cl-jupyter.lisp:

(push (truename (format nil "~Asrc/" (directory-namestring *load-truename*)))
          asdf:*central-registry*)

On Windows (directory-namestring *load-truename*) does not include the drive letter. Therefore, if the lisp kernel is started from a drive different, it fails. I have fixed this locally in cl-jupyter.lisp like so:

(if (member :win32 *features*)
   (push (truename (format nil "~A:~Asrc/" (pathname-device *load-truename*)(directory-namestring *load-truename*)))
          asdf:*central-registry*)
;else
   (push (truename (format nil "~Asrc/" (directory-namestring *load-truename*)))
          asdf:*central-registry*)
)

This works on SBCL and Clisp. I'm not sure about other lisp flavors

WetHat

@WetHat
Copy link
Author

WetHat commented Nov 8, 2018

I have to take this works for Clisp back. The issue is SBCL specific (not sure about other LISP flavors). So the fix might be better written as:

#+(and sbcl win32)(push (truename (format nil "~A:~Asrc/" (pathname-device *load-truename*)(directory-namestring *load-truename*)))
                   asdf:*central-registry*)
#-(and sbcl win32)(push (truename (format nil "~Asrc/" (directory-namestring *load-truename*)))
                   asdf:*central-registry*)   

@fredokun
Copy link
Owner

fredokun commented Nov 9, 2018

Thx for the proposed fix. I have now a windows box so I will try ASAP and patch master accordingly.

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

2 participants