Qlot is a tool used to guarantee that a project always uses the correct library versions, regardless of changes in the installed Quicklisp distribution. While using Qlot, the question may arise of where the qlfile1 should be stored.
The documentation states that the qlfile must be in the project’s root directory. This can be misleading because of the method Qlot uses to determine a system’s root directory.
It is often desirable to place the project’s source files one directory level below the system definition file (.asd). This can be accomplished by including the path for every source file.
It can also be accomplished by using a :pathname directive. This is a cleaner solution because the pathname does not need to be prepended to every source file.
For a project with the following layout,
~/my-project/
|--my-project.asd
|--src/
|--main.lisp
the system definition without the :pathname directive would be
(defsystem :my-project
:components ((:file "src/main")))
and the one with the :pathname directive would be
(defsystem :my-project
:pathname "src"
:components ((:file "main")))
Qlot uses the component pathname to determine a system’s root directory. To find out where your qlfile must go, use this:
(asdf:component-pathname
(asdf:find-system :my-project))
For the two examples above, the results would be:
No :pathname | Using :pathname |
---|---|
~/my-project | ~/my-project/src |
Footnotes:
-
Qlot reads the qlfile to determine which library versions must be loaded. It must be committed to version control together with qlfile.lock, which is generated by Qlot. ↩