4

I want to collect all packages defined during ASDF system loading.

Already tried:

  1. to use difference between (list-all-packages) before and after system loading, but it is not very convenient, because some systems can be loaded as dependencies of the system I'm inspecting of and I need to make a set extraction.

  2. tried to define a initialize-instance :after ((package package) &rest initargs) method, but it does not get called when defpackage form is evaluated.

Also, when I quickloading an ASDF system, I see the [package dexador] in it's output. How does quicklisp do this?

Alexander Artemenko
  • 21,378
  • 8
  • 39
  • 36

1 Answers1

6

In Quicklisp I used *macroexpand-hook*.

Xach
  • 11,774
  • 37
  • 38
  • Interesting. I didn't know about this hook! – Alexander Artemenko Dec 03 '19 at 13:21
  • Great this work! But you also need to process uiop:define-package macro. Here is the fix: https://github.com/quicklisp/quicklisp-client/pull/191 – Alexander Artemenko Dec 03 '19 at 20:42
  • It's meant to give some visual feedback about progress, not to be strictly correct. Since packages can be created via many mechanisms (including with `make-package` at compile time) it would require something more careful and thorough to get an exact result. – Xach Dec 03 '19 at 21:48