Re: Naive DEFSYSTEM replacement
"Tim Bradshaw (as tfb at tfeb dot org)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
Wow, I never thought I'd find myself writing a defence of ASDF! On 26 Jul 2025, at 01:24, Adam Weaver (as adam at cleversure dot com dot au) <[email protected]> wrote: > > But I notice that none of the responses have actually answered the > question I asked, which was *why* ASDF:DEFSYSTEM is as complicated as > it is. *It is not complicated*. I mean, seriously: (defsystem "foo" :components ((:file "a") (:file "b" :depends-on ("a")))) Is not, in fact complicated to use ASDF. And in fact exhaustive studies show that 98.3% of ASDF system declarations look like (defsystem "bar" :serial t :components ((:file "pkg") (:file "low") (:file "pll") (:file "cpll") (:file "dsm"))) Because people like to write the components of their system in dependency-order in the obvious way that anyone would do. The things that are complicated about ASDF *almost never matter*, but when they do they are of two kinds: 1. People want to be able to do things to their systems other than compile and load them. For instance people might want to be able to say 'run the tests for this system' and have ASDF know how to do that for them. Or 'Make a release for this system' which certainly involves at least compiling and loading it, running all the tests, copying the files of the system to some release directory and so on. Or 'define where systems live so they can be found'. You may not want to do those things, but ASDF was not written just for you. 2. There is, in my opinion, historical cruft in ASDF, which really need not be there. However, there undoubtedly are users of ASDF who started using it when that historical cruft was just cruft, and would be a little annoyed if suddenly it all went away. CL also has quite a lot of historical cruft, that's also not going away any time soon. > Martin came closest, in pointing out an unconsidered flaw in my toy > implementation - it doesn't handle automatic recompilation. Which is *the single task that a system definition facility needs to perform*. If it does not do that, it is not a system definition facility. > > But it's not a use-case I have, to be honest. So in other words either - you never plan on writing code of any complexity, especially code which involves macros in nontrivial ways; - or you want to end up living in a world of mud, where you spend most of your time trying to work out exactly what series of incantations you need to perform to recreate the state of the system you had a few minutes ago. Trust me, I've lived in that world of mud, a world with sacred Lisp images which nobody had any idea how to reproduce any more but on which everything depended. That world is not one you want to live in. > Seriously, can anyone answer *why* ASDF:DEFSYSTEM and MK:DEFSYSTEM > are hundreds and thousands of lines of code when my toy 19-line > implementation does something approximate? Because it is solving problems yours does not, the very least of which is 'being a system definition facility'. --tim _______________________________________________ Lisp Hug - the mailing list for LispWorks users [email protected] http://www.lispworks.com/support/lisp-hug.html