Next: Configuring ASDF, Previous: Introduction, Up: Top [Contents][Index]
Many Lisp implementations include a copy of ASDF.
You can usually load this copy using Common Lisp’s require
function:
(require :asdf)
Consult your Lisp implementation’s documentation for details.
Hopefully, ASDF 2 will soon be bundled with every Common Lisp implementation, and you can load it that way. If it is not, see see Loading an otherwise installed ASDF below. if you are using the latest version of your Lisp vendor’s software, you may also send a bug report to your Lisp vendor and complain about their failing to provide ASDF.
To check whether ASDF is properly loaded in your current Lisp image, you can run this form:
(asdf:asdf-version)
If it returns a string, that is the version of ASDF that is currently installed.
If it raises an error, then either ASDF is not loaded, or you are using an old version of ASDF.
You can check whether an old version is loaded by checking if the ASDF package is present. The form below will allow you to programmatically determine whether a recent version is loaded, an old version is loaded, or none at all:
(or #+asdf2 (asdf:asdf-version) #+asdf :old)
If it returns a version number, that’s the version of ASDF installed.
If it returns the keyword :OLD
,
then you’re using an old version of ASDF (from before 1.635).
If it returns NIL
then ASDF is not installed.
If you are running a version older than 2.008, we recommend that you load a newer ASDF using the method below.
If your implementation does provide ASDF 2 or later, and you want to upgrade to a more recent version, just install ASDF like any other package (see see Loading an otherwise installed ASDF below), configure ASDF as usual (see see Configuring ASDF below), and upgrade with:
(require :asdf) (asdf:load-system :asdf)
If on the other hand, your implementation only provides an old ASDF, you will require a special configuration step and an old-style loading:
(require :asdf) (push #p"/path/to/new/asdf/" asdf:*central-registry*) (asdf:oos 'asdf:load-op :asdf)
Don’t forget the trailing /
at the end of your pathname.
Also, note that older versions of ASDF won’t redirect their output, or at least won’t do it according to your usual ASDF 2 configuration. You therefore need write access on the directory where you install the new ASDF, and make sure you’re not using it for multiple mutually incompatible implementations. At worst, you may have to have multiple copies of the new ASDF, e.g. one per implementation installation, to avoid clashes.
Finally, note that there are some limitations to upgrading ASDF:
If your implementation doesn’t include ASDF, if for some reason the upgrade somehow fails, does not or cannot apply to your case, you will have to install the file asdf.lisp somewhere and load it with:
(load "/path/to/your/installed/asdf.lisp")
The single file asdf.lisp is all you normally need to use ASDF.
You can extract this file from latest release tarball on the ASDF website. If you are daring and willing to report bugs, you can get the latest and greatest version of ASDF from its git repository. See Getting the latest version.
For maximum convenience you might want to have ASDF loaded whenever you start your Lisp implementation, for example by loading it from the startup script or dumping a custom core — check your Lisp implementation’s manual for details.
Next: Configuring ASDF, Previous: Introduction, Up: Top [Contents][Index]