Almost there

Dave Cooper david.cooper at
Tue Jul 14 20:58:27 UTC 2015

> >
> > if it's still feasible i suggest to replace REGISTER-IMMUTABLE-SYSTEM
> > with (SETF SYSTEM-MUTABLE-P) and stop exporting *IMMUTABLE-SYSTEMS*.
> >
> I think it's too late to make changes for 3.1.5.
> Indeed, it's probably a bad idea to export *IMMUTABLE-SYSTEMS*. Maybe
> to late to fix in 3.1.5, but hopefully will be fixed in 3.2.
> "Ask not what the government can do for you. Ask what the government is
> doing
> to you." — David Friedman, "The Machinery of Freedom", p. 21

I think either way will work for us, but if register-immutable-system goes
away, it will mean an application code change for us. We are not accessing
*immutable-sytems* directly, so no worries there whether it's exported or

We do call register-immutable-systems, however.

For the record, here is how we are using it:

We make pre-built Gendl or Genworks GDL distributions which do not include
any ASDF or Quicklisp at all, but they are built with
monolithic-compile-bundles generated using asdf in our build environment.

For downstream users of prebuilt distributions who then want to load ASDF
and Quicklisp, we provide a function, "load-quicklisp," which we ask users
to call, rather than directly loading the quicklisp/setup.lisp themselves.

This function takes a :path keyword argument which defaults to the location
of the quicklisp/ directory which we ship with our system. So if the user
wants to use a different quicklisp/ directory (unsupported by us if they
pick a different quicklisp version than what we built with and shipped),
they can do it with that :path argument. The more usual case is that they
copy our shipped quicklisp/ directory into a location where they have write
access, because they want to put stuff into its local-projects/ or do other
things which require write-access to the quicklisp/ directory.

The :path binds the dynamic variable *quicklisp-home*, as used in the
following code:

(load (merge-pathnames "setup.lisp" *quicklisp-home*))

(defclass asdf::gdl (asdf::cl-source-file) ((type :initform "gdl")))
(defclass asdf::gendl (asdf::cl-source-file) ((type :initform "gendl")))
(defclass asdf::lisp (asdf::cl-source-file) ())

(let ((preloaded gdl::*already-loaded-systems*))
  (dolist (system preloaded)
    (asdf/find-system:register-immutable-system system)))

So as you can see, we maintain a variable gdl::*already-loaded-systems*
(which probably ought to be exported, now that I mention it), which is used
to establish the immutable-systems upon loading of quicklisp and asdf into
the prebuilt image. And we do a few other extra initialization things after
loading the quicklisp/setup.lisp.

My Best,

Dave Cooper,
+1 248-330-2979
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the asdf-devel mailing list