ASDF

Another System Definition Facility

ASDF 3

ASDF 3 is the current successor to Daniel Barlow's ASDF.
It was rewritten for improved portability, robustness, usability,
extensibility, configurability, internal consistency,
and the ability to deliver standalone executables.
It was pre-released as 2.27 on February 1st 2013,
released as 3.0.0 on May 15th 2013,
again as 3.1.2 on May 6th 2014, and as 3.1.3 on 24 July 2014.

What it is

ASDF stands for Another System Definition Facility,
in the continuity of the Lisp DEFSYSTEM of yore.

ASDF 3 contains two parts: asdf/defsystem and uiop.

asdf/defsystem

is a tool to describe how Lisp source code is organized in systems,
and how to build a system in term of actions that depend on previous actions.

Typical actions consist in compiling a Lisp source file (if not up to date)
and loading the resulting compilation output (if not both loaded and up to date).
And you must typically compile and load files that define packages, macros, variables,
before you may compile and load other files that use them.

It is roughly what Common Lisp hackers use to build and load software
where C hackers might use GNU Make to build software and
ld.so to load it.

asdf/defsystem is the part that people usually refer to as ASDF,
with uiop being only a supporting library,
that happens to be distributed at the same time, by necessity.

uiop

also known as asdf/driver,
the Utilities for Implementation- and OS- Portability,
is a Common Lisp portability library and runtime support system
that helps you write Common Lisp software in a portable way.

In addition to many general-purpose Lisp utilities,
it notably provides portable abstractions to
gloss over implementation quirks, support hot-upgrade of code,
manipulate pathnames, create programs, use command-line arguments,
access the environment, use the filesystem,
call other programs and parse their output,
compile Lisp code, muffle conditions, or configure Lisp software.
See its
README.

uiop is distributed as part of the ASDF,
its source code is transcluded in the single-file asdf.lisp being distributed
and the precompiled fasls provided by Lisp implementations.
ASDF relies heavily on it for its portability layer and runtime support,
particularly so as to handle pathnames and filesystem access.
uiop is useful on its own and can also be compiled and distributed separately.

What it is not

ASDF will not download missing software components for you.
For that, you want Quicklisp,
that builds upon ASDF, and is great for pulling and installing
tarballs of packages you may depend upon;
we also recommend clbuild,
that now builds upon Quicklisp, as a great tool for pulling from version control
packages you need to modify or want to contribute to.
We recommend you should not use asdf-install anymore,
as it is an older similar piece of software that is both unmaintained and obsolete.

ASDF is also not a tool to build or run Common Lisp software from the Unix command-line.
For that, you want cl-launch,
or perhaps buildapp.

If you're unsatisfied with ASDF,
beside helping with our
TODO list,
you might be interested in other build systems for Common-Lisp:

Alastair Bridgewater's small and simple one-package-per-file
quick-build
(also reimplemented as the ASDF extension
asdf-package-system; similar to faslpath below).

François-René Rideau's
XCVB
(building object and image files deterministically and in parallel,
but not actively maintained since 2012;
thanks to its new build model, ASDF 3 could conceivably be modified
to support these features).

Drew McDermott's
YTools
(the polar opposite, trying to maintain coherence
of the current Lisp image at a fine grain).

There are probably more.
However, none of these systems seems to ever have had the traction of ASDF,
probably because none was technically superior enough (when at all)
to compensate for the first mover advantage.

Supported Implementations

ASDF 3 now supports all CL implementations
that seem to have any current user base, and then some.

Most implementations provide ASDF as a module,
and you can simply (require "asdf").
(All of them but CLISP also accept
:asdf, "ASDF" or 'asdf as an argument.)
Most of these implementations provide ASDF 3,
a few only provide ASDF 2.
Some implementations don't provide ASDF yet,
but have announced they will in their next release.
As for remaining implementations,
they are obsolete and/or mostly unmaintained;
still ASDF 3 supports them if you load it manually,
though there might never be a next release
to provide it through require.

Provide ASDF 3

Provide ASDF 2

Will provide ASDF(?)

Obsolete

Free

abcl ccl clisp cmucl ecl mkcl sbcl

xcl

gcl mcl

Proprietary

allegro

lispworks mocl

scl

cormanlisp genera

To deal with an implementation that doesn't yet provide ASDF 3,
we provide a script that can install ASDF 3
where your implementation goes looking for it
when you require it.
Alternatively, if the implementation provides ASDF 2 or an older ASDF 3,
you can download, install and configure a more recent ASDF 3,
and use (asdf:load-system :asdf) to upgrade it.
Beware: when upgrading from ASDF 2, you should always do it
immediately after the require,
and before you use ASDF for anything else
(ASDF 3 does that automatically).

If there is an old or new implementation that we are missing,
it shouldn't be hard to adapt ASDF to support it.
Ask us!

Examples

Download any of the many packages available through
Quicklisp
to see as many examples.

Finally, while the manual covers all the basics,
some advanced or new features remain underdocumented.
Please contact our mailing-list (see below)
for any issue that isn't well-documented enough.

Until we write more documentation on the further innovations of ASDF 3,
the documentation strings, the source code, the changelog and the git log
are unfortunately your best chances for discovering the available functionality.

Getting it

Though they may lag behind the version here, ASDF comes bundled with most Lisps.
To get the greatest and latest, you can:

asdf-system-connections,
lets you specify systems that are automatically loaded when
two other systems are loaded, to connect them.

asdf-flv,
to bind file-local variables around the compilation of some files.

asdf-package-system,
to compile Lisp source files with one package per file
that also determines dependencies, in the style of
quick-build or
faslpath
(this functionality is built into recent versions of ASDF 3.1 and later,
but this package exists for backward compatibility with earlier versions of ASDF 3;
search the manual for package-inferred-system).

Former extensions, now superseded, include:

asdf-binary-locations allowed one to redirect where ASDF creates its output files,
so they don't clash between implementations and don't pollute source directories.
It is superseded by asdf/defsystem's builtin
asdf-output-translations mechanism;
a limited compatibility mode is available to easily convert
your former ABL configuration into an AOT configuration.
common-lisp-controller and cl-launch used to provide similar mechanisms,
and have also been superseded by asdf-output-translations.

asdf-bundle, née asdf-ecl,
allowed you to create a single-file bundle out of a system,
for easier delivery.
It is now a builtin part of asdf/defsystem,
and allows users to deliver a single FASL for a system,
a standalone executable program (on supported implementations),
or an image containing your system precompiled.

asdf-utils was a collection of utilities that originated with ASDF.
It is now superseded by uiop, aka asdf/driver,
which is part of ASDF,
and exports its functionality
in its own package uiop.

asdf-condition-control, initially part of XCVB's xcvb-driver,
allowed you to muffle uninteresting conditions during compilation.
Is now superseded by equivalent functionality in uiop.

Mailing Lists

asdf-announce
A low-volume mailing-list for announcements only, mostly regarding new releases.
Posting is restricted to project administrators and to important notices.
Please subscribe to it if you're a Lisp implementation or distribution vendor,
who needs to know when to upgrade the ASDF you distribute,
but are otherwise not interested in day to day design and
development.
asdf-announce
mailman site to subscribe

Contributing

What is happening

More bug fixing leads to release of 3.1.4 on 10 October 2014.
There should be no incompatibilities. See the Changelog for more details.

August 2014

The ASDF mailing lists have been reestablished, in particular
asdf-announce, which should allow CL implementers better access to only
the information they want about ASDF development.

May 2014 to July 2014

ASDF bug fixing from 3.1.2 leads to release of 3.1.3, a major bug
fix release. We strongly urge implementors that have shipped with 3.1.2
to upgrade to 3.1.3. There should be no incompatibilities, and some
very important bug fixes are provided. See the Changelog for more details.

July 2013 to May 2014

François-René Rideau has resigned as maintainer
but remained an active developer.
Robert P. Goldman is interim maintainer until someone more gifted,
charming, dedicated, and better-looking can be secured to fill the role.
ASDF 3.0.2 was released in July 2013, 3.0.3 in October 2013, and 3.1.2 in May 2014.
In addition to significant improvements and bug fixes,
notably better Windows support,
ASDF 3.1.2 notably sports the package-inferred-system extension.

November 2012 to June 2013

François-René Rideau completely rewrites ASDF
and publishes ASDF 3, pre-released as 2.27 in February 2013,
and released as 3.0.1 in May 2013.
It now includes both the traditional asdf/defsystem
and a formalized portability library uiop (née asdf/driver).
asdf/defsystem is a backward-compatible reimplementation of ASDF
with correct timestamp propagation based on a consistent dependency model,
and featuring support for bundle output, deferred warnings check, and more.
uiop provides many abstractions to write portable Common Lisp programs.
Last version: 3.0.1.

December 2009 to October 2012

François-René Rideau is de facto maintainer,
with notable contributions from Robert P. Goldman, but also
Juanjo Garcia-Ripoll and James Anderson.
ASDF 2.000 is released in May 2010
with many clean-ups, better configurability, some new features,
and updated documentation.
The ASDF 2 series culminates with ASDF 2.26 in October 2012,
which in addition to many bug fixes and small features
includes support for file encodings, around-compile and compile-check hooks.
Last version: 2.26.

May 2006 to November 2009

Gary King is de facto maintainer,
with notable contributions from
Robert P. Goldman, Nikodemus Siivola, Christophe Rhodes, Daniel Herring.
Many small features and bug fixes,
making the project more maintainable,
moving to using git and common-lisp.net.
Last version: 1.369.

May 2004 to April 2006

Christophe Rhodes is de facto maintainer,
with notable contributions from
Nikodemus Siivola, Peter Van Eynde, Edi Weitz, Kevin Rosenberg.
The system made slightly more robust, a few more features.
Last version: 1.97.

August 2001 to May 2004

Created then developed by Daniel Barlow, with notable contributions from
Christophe Rhodes, Kevin Rosenberg, Edi Weitz, Rahul Jain.
Last version: 1.85.