How to add a local project to asdf configured by quicklisp
Asked Answered
L

4

11

I want to add a local project to the known projects by asdf, but due to the fact that asdf was installed and configured by quicklisp and the *central-registry* points to "#P/home/user/quicklisp/quicklisp/", which contains .lisp files. I do not know how to do it as the manual explains that a symbolic link into the directory would do it, but I do not want to mess around inside quicklisp. (It does work as a hotfix, though!)

Therefore:How to add a local project to asdf (NOT QUICKLISP) which was installed and configured by quicklisp?

Luce answered 29/6, 2012 at 11:34 Comment(0)
M
16

If you use Quicklisp you can use the dedicated directory ~/quicklisp/local-projects/ which is scanned before the others directories. To use it, just put your project or a symbolic link.

(quickproject:make-project "~/quicklisp/local-projects/my-new-website/"
  :depends-on '(restas parenscrit cl-who))

(quickproject:make-project "~/src/lisp/my-cool-gui/"
  :depends-on '(qt))

$ ln -s ~/src/lisp/my-cool-gui ~/quicklisp/local-projects/my-cool-gui  

However, if you really want to configure ASDF do as explained in the documentation .

For example you can put this:

(:directory "~/src/lisp/my-project-XYZ/")

in your ~/.config/common-lisp/source-registry.conf.d/my-asdf.conf to add a directory, or

(:tree "~/src/lisp/")

if you want all the subdirectories to be scanned.

Mumble answered 29/6, 2012 at 16:31 Comment(0)
H
6

As asdf:*central-registry* is not just one path, it is list of pathnames. You can simply do: (push "/path-to-your-project/" asdf:*central-registry*). If you use SBCL, you can add this line to ~/.sbclrc.

Hegelian answered 29/6, 2012 at 13:27 Comment(1)
In the ASDF Manual describes central-registry as being deprecated: "This old style for configuring ASDF is not recommended for new users, but it is supported for old users"Gertrudgertruda
C
3

The ASDF manual has in Section 3:

Since ASDF 2, the preferred way to configure where ASDF finds your systems is the source-registry facility, fully described in its own chapter of this manual. See Controlling where ASDF searches for systems.

Item 7 in Controlling where ASDF searches for systems is

The source registry will be configured from system configuration directory /etc/common-lisp/source-registry.conf.d/ if it exists.

This location is available in Debian and is what I use. By default, Debian puts the sources of downloaded CL libraries in /usr/share/common-lisp/source. However, I don't know (though I have tried to find out) how this location is made known to ASDF. So, you can add files with pathnames to this location, to make those pathnames known to ASDF. I've added a file, /etc/common-lisp/source-registry.conf.d/04-local.conf, containing

(:tree #p"/usr/local/share/common-lisp/source/")

and now i can put sources of locally downloaded CL libraries in /usr/local/share/common-lisp/source/ and they will be visible to ASDL. The :tree syntax is described in Configuring ASDF to find your systems.

asdf:*central-registry* is now depreciated. See Subsection 3.2: Configuring ASDF to find your systems — old style.

Cwmbran answered 30/6, 2012 at 17:57 Comment(0)
H
3

Put

(push "~/your/local/lisp/projects/folder/" ql:*local-project-directories*)

in your .sbclrc and you can quickload your projects without symlinks or moving folders.

I know you asked about asdf, but I don't think you want to mess around with asdf, when you're actually using quicklisp.

Hardej answered 29/8, 2019 at 8:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.