Mention (recommend?) ASDF package-inferred-system
Package-inferred-system have multiple benefits over the older way:
- No need to list the files to compile.
- No need to list the dependencies, ASDF will figure them out from the package
imports.
If someone wants to have a list of all dependencies actually used by the system, the following function can do:
(defun system-depends-on (system)
"List SYSTEM dependencies, even if SYSTEM is an inferred system.
From: https://gitlab.common-lisp.net/asdf/asdf/issues/10#note_5018."
(let (depends)
(labels ((iter (openlist)
(if (null openlist) depends
;; Is this a subsystem of SYSTEM?
(let ((find (search system (first openlist))))
(if (and find (zerop find))
(iter (append (asdf:system-depends-on (asdf:find-system (first openlist))) (rest openlist)))
;; If not, it's a direct dependency: collect it.
(progn
(pushnew (first openlist) depends :test 'equalp)
(iter (rest openlist))))))))
(iter (list system)))))
Is it really a good idea to recommend this feature?
I mean, even though you save some typing with it, you lost some maintenance, since the dependencies become implicit.
Also how do you specify if a symbol should be exported or not?
I believe you save maintenance, since you don't have to keep the list of dependencies in the .asd in sync with what you actually use in the defpackage.
Note that this has nothing to do with symbol export, which happens in defpackage, not in the .asd.
To mention, sure, I just wouldn't recommend it until I use it myself.
Note that this has nothing to do with symbol export, which happens in
defpackage, not in the .asd.
Sorry, I understand now.
It is a way to write ASDF system file, and has nothing to do with Lisp packages.