Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to arrange for Quicklisp to load the local version of a given library

I am using Quicklisp to load libraries in my Common Lisp project and I need to load a customised version of some library instead of the version provided by Quicklisp.

The customised version of the library is stored in the local projects directory from Quicklisp and local projects have been registered. However Quicklisp still tries to load its own version of the library.

How can arrange for Quicklisp to prefer the customised of the library? (Side question: how can I ask Quicklisp which location it will use to load a library?)

like image 422
Michaël Le Barbier Avatar asked Jun 24 '18 10:06

Michaël Le Barbier


1 Answers

If the project's system file is loadable with ASDF, it is loaded in preference to the Quicklisp-provided version. The easiest way to do that is to put the project's sources into ~/quicklisp/local-projects/ (or wherever your quicklisp is installed rather than ~/quicklisp/) and run (ql:register-local-projects). But other methods, like updating the ASDF registry configuration and putting the project somewhere known to ASDF via the registry, also work.

To find out where Quicklisp is loading your project, you can use (ql:where-is-system "system-name").

Remember that

The local-projects mechanism is configured through a special variable ql:*local-project-directories*. By default, it includes only the local-projects subdirectory in the Quicklisp install directory, but you can add or remove directories at any time to have more places scanned for systems. To disable the local-projects mechanism entirely, set ql:*local-project-directories* to NIL.

(Quicklisp News Blog)

like image 185
Xach Avatar answered Sep 22 '22 09:09

Xach