LispWorks IDE User Guide > 25 The System Browser > 25.9 ASDF Integration

NextPrevUpTopContentsIndex

25.9.1 Interface to source code managers

The interface comprises a function scm:add-system-namespace which must be called, and a set of generic functions for which methods need to be defined.

scm:add-system-namespace adds a namespace of "systems", which:

LispWorks has its own built-in source code manager ( lw:defsystem , lw:compile-system , lw:load-system , lw:concatenate-system and related functions). A widely-used source code manager is ASDF.

In the LispWorks IDE tools, a system name that contains a colon is interpreted as

namespace : systemname

To find the system LispWorks applies the finder specified in scm:add-system-namespace to the string systemname . A system name without a colon is searched (using the finder ) in all the known namespaces. Note that this means that a system name without a colon may match several systems in different namespaces.

In addition to the integration interface, there are new functions which look at the namespaces and systems.

The most important symbols in the integration interface are described in the remainder of this section. "module" means one of the objects that is returned by the finder in scm:add-system-namespace or by the system-lister in scm:add-system-namespace or by scm:module-children . A "system" is a module for which scm:module-is-system-p returns true.

scm:add-system-namespace

Function

add-system-namespace name &key finder system-lister name-lister

The function scm:add-system-namespace tells LispWorks about another system namespace.

name must be a string. It is compared case-insensitively. The name must be different from "LW" , which is the namespace for the LispWorks built-in lw:defsystem systems.

finder must be supplied as a function or symbol which takes one argument, a string. If there is an exact match (case-insensitive) it returns a module object or a list of module objects. The finder needs to be error-free when called with a string.

system-lister must be a designator for a function which takes no argument, and returns a list of the known systems in the namespace.

name-lister is optional. If supplied, it must be a designator for a function which takes no argument and returns a list of the names of the systems in the namespace. If it is not supplied, the system uses system-lister and maps scm:module-name on the result.

scm:module-name

Generic Function

module module => name

The function scm:module-name must be defined for any module. It takes a module and returns its name.

scm:module-is-system-p

Generic Function

scm:module-is-system-p module => boolean

The generic function scm:module-is-system-p returns true if the module is a "system". That is, it has children. The default method returns false.

scm:module-children

Generic Function

scm:module-children module => list-of-modules

The generic function scm:module-children returns the children of the module, if any. The default method returns nil . This generic function is called only on "systems", that is after checking that scm:module-is-system-p returned true.


LispWorks IDE User Guide (Macintosh version) - 22 Dec 2009

NextPrevUpTopContentsIndex