[asdf-devel] ASDlite - light-weight excerpt from ASDF

Dmitriy Ivanov divanov11 at gmail.com
Mon Apr 23 07:55:40 UTC 2012


Hello folks,

Excuse my bothering if this is not a correct place to announce.
Nonetheless...

ASDlite Design Goals

1. Small footprint.
2  Ease of embedding into applications and systems not related to
   "compile-and-load Lisp files" tasks.
   For example: YstokHelp (http://lisp.ystok.ru/yhelp/)
3. ASDF compatibility for basic needs.
4. Operation arguments specification in dependencies.

Observation and Rationale

 1. The ASDF built-in operation hierarchy is actually of two-level depth.
    Original ASDF code does not exploit operation inheritance much
    (though something can be found in asdf-ecl.lisp).

 2. The operation slots are rather useless:
    original-initargs
      Is only referred in print-object
    parent
      In principle, indicates the target operation that required this one.
      But due to reusing operation objects in make-sub-operation,
      this is not the case.
      Also used for marking along with other visiting slots during traverse
      but we follow another approach.

    Adding entirely new operations, i.e. on the first level, is fine.
    But there is comfortable way to refine existing operations: the easiest
way
    is to add slots to base operation classes as only those properties
    do get passed into dependency operations.

    There is a more simple way pass arguments from operate to
    operation functions - by means of key arguments!

 3. The :do-first initarg is actually ignored by ASDF - its always set to
     ((compile-op (load-op , at depends-on))))

 4. Avoid inline methods, which are rather inelegant in ASDF:
    - they rely on eval,
    - ASDF tries to remove a method from a generic function of a different
name.
    Due to non-standard behavior of remove-method in LW 4.4, system
redefinition
    intrusively signals about this.

 5. Referring to features in component definition is more useful than for
    dependency rules.

Operations in ASDlite

  operation ::= keyword | operation-instance
  operation-type ::= keyword | type-symbol
  operation-designator ::= keyword | (keyword . plist)
       | type-symbol | operation-instance

Operations are passed to perform and other operation-specific  methods.
Operation designators can be used in the right-hand side of rules.

We encourage using simple keywords like :compile or :load.
For these, ASDlite defines corresponding methods with eql specializers.
The plist allows you to pass key arguments to the operation methods.
In the "normal" mode, ASDlite accepts only keyword-based forms.

If you feel these are not enough and need "full-fledged" ASDF operation
classes, you can switch to the ASDF compatibility mode as follows:
- push :asdf-compat into *features* before compiling asdlite.lisp,
- refer to asdf:compile-op, asdf:load-op and the like,
- define your own subclasses of the operation class
  etc.
In the compatibility mode, ASDlite accepts all the above forms of operations
and designators.

Downloads and Details
http://lisp.ystok.ru/asdlite/

--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru







More information about the asdf-devel mailing list