Next: , Previous: , Up: The object model of ASDF   [Contents][Index]


7.1 Operations

An operation object of the appropriate type is instantiated whenever the user wants to do something with a system like

Operations can be invoked directly, or examined to see what their effects would be without performing them. There are a bunch of methods specialised on operation and component type that actually do the grunt work. Operations are invoked on systems via operate (see operate).

ASDF contains a number of pre-defined operation classes for common, and even fairly uncommon tasks that you might want to do with it. In addition, ASDF contains “abstract” operation classes that programmers can use as building blocks to define ASDF extensions. We discuss these in turn below.

Operations are invoked on systems via operate.

Generic function: operate operation component &rest initargs &key force force-not verbose &allow-other-keys
Generic function: oos operation component &rest initargs &key &allow-other-keys

operate invokes operation on system. oos is a synonym for operate (it stands for operate-on-system).

operation is an operation designator: it can be an operation object itself, or, typically, a symbol that is passed to make-operation (which will call make-instance), to create the operation object. component is a component designator: it can be a component object itself, or, typically, a string or symbol (to be string-downcased) that names a system, more rarely a list of strings or symbols that designate a subcomponent of a system.

The ability to pass initargs to make-operation is now deprecated, and will be removed. For more details, see make-operation. Note that dependencies may cause the operation to invoke other operations on the system or its components: the new operations may or may not be created with the same initargs as the original one (for the moment).

If force is :all, then all systems are forced to be recompiled even if not modified since last compilation. If force is t, then only the system being loaded is forced to be recompiled even if not modified since last compilation, but other systems are not affected. If force is a list, then it specifies a list of systems that are forced to be recompiled even if not modified since last compilation. If force-not is :all, then all systems are forced not to be recompiled even if modified since last compilation. If force-not is t, then all systems but the system being loaded are forced not to be recompiled even if modified since last compilation (note: this was changed in ASDF 3.1.2). If force-not is a list, then it specifies a list of systems that are forced not to be recompiled even if modified since last compilation.

Both force and force-not apply to systems that are dependencies and were already compiled. force-not takes precedences over force, as it should, really, but unhappily only since ASDF 3.1.2. Moreover, systems which have been registered as immutable by register-immutable-system (since ASDF 3.1.5) are always considered forced-not, and even their .asd are not refreshed from the filesystem. See Miscellaneous Functions.

To see what operate would do, you can use:

(asdf:traverse operation-class system-name)
Function: make-operation operation-class &rest initargs

The initargs are passed to make-instance call when creating the operation object.

Note:initargs for operations are now deprecated, and will be removed from ASDF in the near future.

Note: operation instances must never be created using make-instance directly: only through make-operation. Attempts to directly make operation instances will cause a run-time error.


Next: , Previous: , Up: The object model of ASDF   [Contents][Index]