Incremental-developmentification of McCLIM
Upgrading McCLIM (or even hacking on it) is hard work for your
computer. That’s due to the use of :serial t
in the
system definition that manages to be compatible to ASDF (which has an
idea of “real” dependencies) and other defsystems (for example,
MK:DEFSYSTEM and the ones in LispWorks and Allegro CL) because of
this.
So whenever you update a file, your defsystem must recompile all the files that are listed after it in the McCLIM system definition. This can result in 20 files that need to be recompiled for changes to a file that only 6 files actually depend on.
This has resulted in lots of gnashing of teeth from people who want to spend their time hacking cool stuff with McCLIM, and less time waiting for it to finish compiling.
(Here’s the bragging part. Skip below for actual code.) So I sat down and wrote a bit of awful code, which essentially does this:
- Find out which “interesting” symbols a defsystem’s components use
- Find out which components use which symbols (establishing file->symbols and symbol->files mappings)
- Order the components according to the existing :serial definition and use the first component for group of files as the dependency target for the others.
This (and the symbol finder, which really wants to be an XREF thing)
is a bit conservative, in that it generates dependencies when in doubt
- if a file uses CLIMI::Q
and another file uses CLIMI::Q as a
temporary variable, the code emits a dependency. But then, the
resulting system definition works as good as the original
mcclim/system.lisp file worked for me.
(Skip to this point to escape the bragging part.) You can get the ASDF system definition that i tested from lisppaste, at. Just replace mcclim’s system.lisp file with it and load the components as you normally would. I would like to hear from you if it works or breaks for you. Tell me at #lisp / irc.freenode.net. I’m “antifuchs”.
Things to test:
- Building “from scratch”: remove all .fasl files and rebuild with the new system definition in place
- reloading a system after files have changed: touch random .lisp
files and
(asdf:oos 'asdf:load-op :clim) ; for example