[erlisp-devel] Erlisp file loading order

Dirk Gerrits dirk at dirkgerrits.com
Fri Sep 2 15:44:55 UTC 2005


Eric Lavigne wrote:
> node.lisp contains the following line:
>      (defvar *current-node* (make-instance 'local-node))
> 
> Now that nodes are more than just an empty class (each node has a
> system-manager), there is a need to call functions while creating node
> instances (such as spawn).

The variable *CURRENT-NODE* is not part of the API.  (I know, it's hard
to tell without a proper DEFPACKAGE form or documentation...)  The 
function CURRENT-NODE is, part of the API, and you can just change it
like this:

(defvar *current-node* nil)

(defun current-node ()
   (when (null *current-node*)
     (setq *current-node* ...))
   *current-node*)

> Is it okay to have circular dependencies in asdf?

Most definately not.  The dependency graph undergoes a topological sort,
and the resulting ordering is the order in which the files are loaded.
With cycles in the graph, no topological ordering exists.

- Dirk




More information about the Erlisp-devel mailing list