Subject: [bug#59592] Keep asd-systems for cl-* packages

From: Guillaume Le Vaillant <[email-masked]>
Date: Tue, 10 Jan 2023 13:05:02 +0000

Hi,

The 'asd-systems' field contains the minimal subset of the ASDF systems
defined by a library that, when compiled, compiles all the systems of
the library.

For example, the ironclad package has many subsystems:
  "ironclad/ciphers"
  "ironclad/digests"
  "ironclad/cipher/aes"
  "ironclad/cipher/threefish"
  "ironclad/digest/sha256"
  "ironclad/public-key/ed25519"
  ...
but the 'asd-systems' field only contains "ironclad".

The mcclim package also has many subsystems:
  "automaton"
  "clim"
  "clim-core"
  "clim-core/frames"
  "clim-core/system"
  "drei-mcclim"
  "esa-mcclim"
  "mcclim-backend-common"
  "mcclim-fonts"
  "slim"
  ...
but the 'asd-systems' field only contains the top level ones, "mcclim",
"clim-examples" and "clim-debugger".

So you can't rely on the contents of 'asd-systems' to have a complete
list of the systems defined by a library.

You could get the full list by searching the for 'defsystem' forms in
the sources directly, with something like:

--8<---------------cut here---------------start------------->8---
find sources -name "*.asd" -exec grep "(defsystem" {} \; | cut -d ' ' -f 2
--8<---------------cut here---------------end--------------->8---

But it would only work for systems not using the package-inferred-system
feature of ASDF.

In my files, I found a function (I don't remember where I got it from)
that can get all the dependencies of a loaded system, even the ones
using package-inferred-system. Maybe it could be modified to limit the
results to a specific library's source tree...