cyrus
cyrus

Reputation: 1356

ASDF not finding package in custom directory

I'm new to Common Lisp, I'm using Emacs/SLIME on Windows 10, and I'm trying to wrap my head around how CL and ASDF/packaging works.

I have a custom package 'my-pack' in a directory 'D:\Dropbox\my-packages'.

I have created a .conf file in:

%LOCALAPPDATA%\config\common-lisp\source-registry.conf.d\ 

And added this line:

(:tree "D:\\Dropbox\\my-packages\\")

I opened Emacs, started SLIME and made the project via the REPL:

(cl-project:make-project #p"D:/Dropbox/my-packages/my-pack)

I verified that the project is in the directory and then loaded the system with asdf (version 3.3.1):

(asdf:load-system :my-pack)

And it worked fine.

But when I quit and restart Emacs, I get the following error when trying to the load the system:

Component :MY-PACK not found
   [Condition of type ASDF/FIND-COMPONENT:MISSING-COMPONENT]

As far as I can tell I've followed the steps in the manual. Any help appreciated.

Upvotes: 2

Views: 687

Answers (1)

Ehvince
Ehvince

Reputation: 18375

  1. cl-project's make-project ends with this line:
(push dir asdf:*central-registry*)

it adds your new project's directory to this list that tells ASDF where to look for projects. What is its value when you restart CL?

2.

\config\common-lisp\

Shouldn't it be .config?

  1. However, I don't encourage to use this conf file with :tree. The doc says:

tell ASDF to recursively scan all the subdirectories

So, imagine that just once, you try yourself at web development and you install, for example, JavaScript dependencies with npm or equivalent, you'll end up with a gigantic node_modules/ and your Lisp will now take a few seconds to start up.

I suggest to put your projects under ~/common-lisp/ or ~/quicklisp/local-projects, or to create symlinks, or to add yourself your projects in asdf:*central-registry* from your Lisp startup file:

;; .sbclrc
(pushnew "/home/me/projects/ciel/" asdf:*central-registry* :test #'equal)

Upvotes: 2

Related Questions