4 ms·
You do not need to explicitly load them, ASDF will do it for you. You do need to declare the dependencies though. Here is an example (example.asd) (defsyst
by armitron 10y ago
You do not need to explicitly load them, ASDF will do it for
you. You do need to declare the dependencies though.
Here is an example (example.asd)
(defsystem :example
:name "Example"
:description "Example."
:author "foo@bar"
:serial t
:license "BSD"
:version "1.0"
:depends-on (:sxql :cl-ppcre :dexador :clss :plump)
:components ((:file "packages")
(:file "file1")
(:file "file2")
(:file "file3")))
You don't need to specify .lisp extension for files.
Your packages.lisp may be:
(in-package #:cl-user)
(defpackage #:example
(:use #:cl #:sxql #:cl-ppcre)
(:export #:*global-symbol*
#:exported-function))
Then you can load your system through ASDF, including all its dependencies,
like so:
(asdf:oos 'asdf:load-op :example)
This assumes that example.asd is inside a directory that can be found in:
asdf:*central-registry*
- rhabarba 10y agoAh, I see, thank you. So I'll have to "install" the script into the registry before being able to just "use" it? :(
- fiddlerwoaroof 10y agoThe easiest way to do it is to create a .asd for your project and then symlink or copy your project into ~/quicklisp/local-projects (i.e. the folder "local-projects" in the same directory as setup.lisp). Then, either run (ql:register-local-projects) or restart lisp and then do (ql:quickload :my-project) to load it.
- rhabarba 10y agoHmm, that makes "just clone the repository and you're done" rather hard. I'll reconsider... I added the list of packages to the README and I'll think about a good way to use ASDF without QL and/or usability loss later. Thank you though!