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


7.5 Parsing system definitions

Thanks to Eric Timmons, ASDF now provides hooks to extend how it parses defsystem forms.

Warning! These interfaces are experimental, and as such are not exported from the ASDF package yet. We plan to export them in ASDF 3.4.0. If you use them before they are exported, please subscribe to https://gitlab.common-lisp.net/asdf/asdf/-/issues/76 so you are made aware of any changes.

Function: parse-component-form parent options &key previous-serial-components

This is the core function for parsing a system definition. At the moment, we do not expect ASDF extenders to modify this function.

When being called on a component of type system (i.e., inside the defsystem macro), parent will be NIL.

Generic function: compute-component-children component components serial-p

This generic function provides standard means for computing component children, but can be extended with additional methods by a programmer.

Returns a list of children (of type component) for component. components is a list of the explicitly defined children descriptions. serial-p is non-NIL if each child in components should depend on the previous children.

Generic function: class-for-type parent type-designator

Return a class designator to be used to instantiate a component whose type is specified by type-designator in the context of parent, which should be either a parent-component – or subclass thereof – or nil (if the type designator is some class of system).

This generic function provides a means for changing how ASDF translates type-designators (like :file) into CLOS classes. It is intended for programmers to extend by adding new methods.

Warning! Adding new methods for class-for-type is typically not necessary: much can already be done by using :default-component-class and defining (and explicitly calling for) new component types.


Previous: Functions, Up: The Object model of ASDF   [Contents][Index]