[asdf-announce] ASDF 2.27 released
fahree at gmail.com
Fri Feb 1 18:38:14 UTC 2013
Dear Lisp hackers,
I am relieved to announce that over two months in the busy making,
I am finally releasing ASDF 2.27; however, whereas the name correctly
suggests backward compatibility, it fails to convey the major changes
that happened underneath, and this release should be considered as
an early release of an upcoming ASDF 3.0: during those hazy weeks,
I completely rewrote ASDF, twice, with it doubling in size,
tripling in features, and hopefully halving in bugs since ASDF 2.26.
While I did my best to preserve backward compatibility,
I also deprecated many features I think were harmful (see below),
and removed a few of them after looking whether the software in Quicklisp
was using them and sometimes sending patches to the upstream maintainers.
If you experience breakage, please update your software first,
and contact me if the problem persists.
I would particularly like to thank
Anton Vodonosov, Stas Boukarev, Stelian Ionescu, Robert Goldman and Zach Beane
for their instrumental help in getting ASDF tested, improved,
made backward compatible, and in general of greater quality.
Yet all the bugs that remain are mine, all mine.
Here is a "short" summary of notable user-visible changes since ASDF 2.26.
* ASDF-BUNDLE was merged into ASDF.
This notably means fewer headaches for users of ECL;
it also means a new load-fasl-op feature for all users of a modern CL,
making it easier to deliver software as a single fasl.
After release, I plan to offer a patch so SBCL use that for its contrib's.
All remnants of asdf-bundle's predecessor asdf-ecl were removed.
* DECADES-OLD bugs of notable significance were fixed:
(a) changes in dependencies now trigger a rebuild across systems, and
(b) timestamps are now correctly propagated (they weren't at all!)
Fixing them required a complete rewrite of ASDF's dependency tracking.
In olden days, some have argued for not rebuilding systems that :depend-on
a modified one as a "feature". It really isn't. On the other hand,
it is now possible to explicitly prevent a system from being rebuilt, using
an actual feature, :force-not, which was released in 2.21 in April 2012.
* PREPARE-OP was introduced to fix a conceptual bug in the ASDF object model.
It corresponds to "loading the dependencies of a component and its parents"
and is explicitly depends-on'ed by LOAD-OP and COMPILE-OP of the component,
instead of their implicitly depending on it via the TRAVERSE algorithm,
which implicit dependency proved fatal in cases revealed by the above bugs.
It propagates upward in the component hierarchy, rather than downward,
like the TRAVERSE algorithm used to systematically propagate dependencies.
* TRAVERSE was gutted out and factored into reusable higher-order functions
and objects, which not only fixes the above conceptual bug, but makes for
semantics that are simpler to implement, possible to understand,
easier to extend, and less limited in expressivity.
TRAVERSE doesn't automatically propagate operations
downward the component hierarchy anymore;
propagation is now implemented through methods on COMPONENT-DEPENDS-ON.
* COMPONENT-DEPENDS-ON is now more powerful:
it can express dependencies on arbitrary operation objects
(i.e. operations of the same class can have different options)
acting on arbitrary component objects
(i.e. not necessarily siblings of the current component).
The ASDF object model can now express arbitrary build graphs, with
no more special magic for children components vs other dependencies.
* COMPONENT-DO-FIRST is no more. It used to specify some dependencies
that were skipped if no re-build was triggered based on local timestamps;
except that ASDF 1 didn't let the users control it,
and ASDF 2 only let you control it since 2.017 or so.
In ASDF 3, COMPONENT-DEPENDS-ON is used for all dependencies,
and all are consulted to correctly propagate timestamps.
However actions meant for in-image side-effects are included
only if needed, and might be visited twice by TRAVERSE,
first without the needed-in-image-p flag, another time with.
You can use :IN-ORDER-TO everywhere you used to use :DO-FIRST, if ever.
* FORCE and FORCE-NOT now correctly distinguish T from :ALL in addition to
a list of system name specifiers, as per the original specification
(which was never implemented in ASDF 1). Additionally,
builtin systems (such as SB-BSD-SOCKETS on SBCL) cannot be forced
(which doesn't work on SBCL).
* IF-FEATURE is a new attribute of components that accepts an arbitrary
feature expression such as (:and :sbcl (:or :x86 :x86-64)),
which when defined is a precondition to the component being enabled;
when the expression is false, the component is disabled,
and dependencies to it are removed.
It replaces the misguided :if-component-dep-fails attribute of modules
and the accompanying :feature feature, which were dropped.
They were not very expressive, clunky to use, and relied on baking
conceptually dubious non-local behavior in the old TRAVERSE algorithm,
which belied the object model and defeated other features.
Unhappily, this breaks backwards compatibility for the few who used it,
namely sb-grovel, nibbles and ironclad.
A minimal compatibility layer is included that allows ASDF 3 or later
to load the SB-GROVEL of old versions of SBCL; but it won't suffice
to load an old version of nibbles or ironclad; please upgrade them
a recent version that was updated to support ASDF 3.
* CONCATENATE-SOURCE-OP is a new operation that builds a single Lisp file
from all the source files in a system,
which allows you to develop in a structured way with many compact files,
yet deliver a large single file. Other related operations allow you
to load that source file, or compile and load it,
or do the same while including all other system dependencies.
ASDF was broken up into lots of small files, to be delivered that way.
* FOO/BAR/BAZ names will be recognized by defsystem as having to be located
in a file called foo.asd. This is backward compatible in the case where
you somehow arranged to load foo.asd before to use the other subsystems,
except now ASDF can find the subsystems by name without the main system
definition having been loaded. See uses of function PRIMARY-SYSTEM-NAME.
* BUILD-OP is a generic operation that can do the "right thing" for
each system, without users having to maintain the knowledge of
what the right thing is for each system they may indirectly depend on.
* Convenience methods were added to most exported generic functions,
so you can (input-files 'compile-op '(system1 "file1")) instead of
(input-files (make-instance 'compile-op) (find-component 'system1 "file1"))
This notably makes it much easier to interact with ASDF at the REPL
and debug your system definitions or ASDF extensions (or modifications).
* Packages were introduced as ASDF was broken up into small files.
Each file now has its own package, importing and exporting functionality,
following the style made popular by faslpath and quick-build.
ASDF does not yet include builtin support for quick-build or faslpath
systems and dependencies, however. Possibly in ASDF 2.28.
* ASDF-DRIVER is a separately-usable library for Common Lisp runtime support.
It is transcluded in asdf.lisp (i.e. when delivering ASDF as a separate
bootstrap file, the contents of ASDF-DRIVER have been included in it),
but can also be used as a separate ASDF system on top of an old ASDF
(within limits: CLISP and XCL still need a recent ASDF).
The package ASDF/DRIVER (with short nickname :D) re-exports
all the functions that ASDF needed to run portably.
* Pathnames are a notable part of ASDF-DRIVER, required to deal
portably with pathnames despite the many bugs and variations
from platform to platform. See notably in pathname.lisp,
MERGE-PATHNAMES*, SUBPATHNAME, PARSE-UNIX-NAMESTRING,
PARSE-NATIVE-NAMESTRING, ENSURE-PATHNAME, and many many more.
* Pathname use by ASDF was also improved in countless small ways,
closing more buglets that appeared in as many corner cases.
For instance, system pathname defaulting was improved,
and systems not associated with a file will now have NIL as their pathname,
which will otherwise be correctly treated.
Many things that would vary depending on implementation will work better.
Also, although we cannot strongly enough disrecommend the use of so-called
"logical pathnames", especially where portability matters in any way, we
support them better than ever within the limitations of the implementation.
* Image lifecycle support is included in ASDF-DRIVER (and thus ASDF);
this standardizes things like access to *COMMAND-LINE-ARGUMENTS*,
declaring an entry-point to a program, hook functions and/or a prelude
to run before to start the main entry, and a postlude and/or hook functions
to run before to dump an image, dumping or creating an image, etc.
* PROGRAM-OP allows you to create standalone executables on implementations
that support it: CLISP, Clozure CL, CMUCL ECL, LispWorks, SBCL, SCL.
A hello-world-example system shows demonstrates how to use it.
* Run-program is a replacement for the old run-shell-command.
Unlike run-shell-command, it is portable to Windows as well as Unix,
it can avoid going through a shell and will sensibly escape arguments
when it does go through a shell, and it has a usable interface
to either capture program output or run the program interactively.
This supersedes run-program/ previously available from xcvb-driver,
including several improvements and portability fixes.
* Conditions can be selectively muffled around compilation thanks to
the an around-compile hook and the *UNINTERESTING-COMPILER-CONDITIONS*
parameter, and around loading with *UNINTERESTING-LOADER-CONDITIONS*
which is _appended_ to the former during loading.
This supersedes the functionality previously available from xcvb-driver
and its thin wrapper asdf-condition-control, which was retired.
* Deferred warnings for yet undefined functions, that in a single-session
build are usually signaled at the end of a compilation unit, will be
saved and reassembled to make each system a compilation unit of its own,
even when compilation of file happens across multiple sessions;
only CCL and SBCL support this feature at this time.
I welcome patches for other compilers, for which ASDF will _not_
wrap an implicit WITH-COMPILATION-UNIT around its operate method anymore.
* COMPILE-FILE* was beefed up to support all these features and more,
and the Right Thing(tm) on all implementations, including
support for their various extensions.
* Internals have been refactored, and some sorry features were excised.
The semantics of OPERATION-DONE-P is simplified and now well-specified.
FIND-COMPONENT will pass component objects through, and
a corresponding FIND-OPERATION replaces MAKE-SUB-OPERATION.
Many internal accessors were renamed, after checking on Quicklisp
that no one was using them.
* Portability updates were done for each and every implementation.
Working support for GCL 2.6 was restored, with notable limitations
including lack of support for output-translations or logical-pathnames.
* TRUENAME resolution can be reliably turned off in all cases where
ASDF was using them by setting the variable *RESOLVE-SYMLINKS* to NIL.
This is useful if your operating system makes that operation slow,
or if your build system uses symlinks to content-addressed storage
in which case TRUENAME just does the wrong thing.
* PERFORMANCE of ASDF3 is somewhat slower (about 70%) than ASDF2
when *RESOLVE-SYMLINKS* is true, and slightly faster when it is false;
but underneath ASDF3 does much more work than ASDF2.
* VERSION strings can now be specified as having to be fetched
from a file using a (:read-file-form <path>) specification,
that can use an optional :at keyword argument to specify
a form or subform other than the first form in the file,
as per the utility asdf-driver:access-at. For instance,
if your file specials.lisp is a defpackage, an in-package
and a defparameter of the version, then you could use:
(:read-file-form "specials.lisp" :at (2 2))
This makes it easier for developers to manage versioning
of one or multiple systems with a single master version location.
* COMPONENT-PROPERTY and the :PROPERTIES initarg of defsystem are deprecated;
though they are still supported for now, we intend to retire them
in a hypothetical future ASDF 4. To replace them, we recommend you instead
define a subclass of asdf:system, with new slots and/or initargs, and
use them with the :defsystem-depends-on and :class options of defsystem.
We looked at usage of in Quicklisp systems, and added to asdf:system
these slots corresponding to the general-purpose metadata we saw:
:homepage :bug-tracker :mailto :long-name
* Self-Upgrade of ASDF will happen automatically as the first thing
before any attempt to build anything, as it was determined that
doing it in the midst of a build breaks everything, and it is not
otherwise possible to reliably detect in advance whether ASDF may
be needed in such midst. If you don't want an ASDF upgrade, just
don't configure your source-registry to include any copy of ASDF.
* DEFINE-PACKAGE is provided as a replacement to DEFPACKAGE that supports
hot upgrade of software where some packages have changed.
It also provides new forms :MIX and :REEXPORT which can be quite practical.
* ASDF-USER is now the shared package in which all .asd files are loaded.
There will be no more temporary packages created
around the loading of each .asd file. This shouldn't change much for users:
you should probably still define your own private package whenever you
define new classes, functions, or variables, to avoid namespace conflict;
except now, when you don't, you can still access your defined symbols
after the file is loaded.
ASDF is not the right place to fix Common Lisp namespace issues, and
these temporary packages were never a successful fix anyway;
indeed, users were still required to define their own package as soon
as they wanted to define variables, functions and classes
in the system file.
* ASDF3 was added to the *features* so you can detect the presence of
this massively updated ASDF and its new features with #+asdf3.
* Documentation received some updates, though by no means comparable
to the complete rewrite of the code base.
* Tests were updated, notably including support for bundles, encodings,
run-program, and more. They were successfully run on
abcl allegro allegromodern ccl clisp cmucl
ecl ecl_bytecodes lispworks sbcl scl xcl
Manual tests were run on gcl2.6 genera lispworks-personal-edition.
Untested remain cormancl mkcl rmcl.
The internal test system itself was massively improved.
* ASDF-DEBUG is a simple utility to make your favorite debugging primitives
available in the package you're debugging. See contrib/debug.lisp
and the asdf/utility:*asdf-debug-utility* variable.
* ASDF-UTILS is now but an empty shell that depends-on ASDF-DRIVER.
The ASDF-DRIVER package has the ASDF-UTILS nickname, and exports
all the functionality that used to be in ASDF-UTILS, and much more,
minus a few misdesigned things from ASDF1 that you ought not
to have been using, and for which there are non-broken replacements.
ASDF-UTILS was distributed separately from ASDF; ASDF-DRIVER is available
both as part of ASDF 3 and later and separately.
* POIU was updated. This extension is still distributed separately from ASDF.
It is now much simplified and made correct by construction by
reusing the new TRAVERSE infrastructure of ASDF and now being able to
assume the ASDF object model is a complete description of dependencies.
On SBCL it will handle deferred warnings from background compilations.
Where forking is not supported or not possible because of threads,
it will gracefully fall back to serial compilation.
* INFERIOR-SHELL (distributed separately) was updated to use asdf-driver
instead of xcvb-driver. It notably provides a richer interface to
the RUN-PROGRAM functionality.
* SLIME support for ASDF was significantly enhanced.
It is distributed with SLIME, separately from ASDF.
See latest slime checkin from 2013-01-29.
It requires ASDF 2.014.6 or later (as used by 2011 quicklisp releases).
We recommend that you should include slime-asdf in your slime-setup
and that in your ~/.swank.lisp you should include:
(pushnew 'try-compile-file-with-asdf *compile-file-for-emacs-hook*)
Please test extensively and report issues.
A release 2.28 may follow shortly to address any important issues found,
and a release 3.0 will hopefully happen a month from now
after everyone is satisfied with the new ASDF.
Excerpt from defsystem asdf/defsystem, this new metadata slots:
:mailto "asdf-devel at common-lisp.net"
:source-control (:git "git://common-lisp.net/projects/asdf/asdf.git")
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
I once argued that slavery was once a great progress... over anthropophagy.
Well, anthropophagy once was a great progress... over starvation.
More information about the asdf-announce