[asdf-devel] tracking changes in lisp-image and Re: Re: compile---with-nicknames

Faré fahree at gmail.com
Tue Oct 18 21:05:50 UTC 2011


On Tue, Oct 18, 2011 at 16:50, Сергей Катревич <linkfly1 at newmail.ru> wrote:
>> Is there any particular effect you think would be useful at load time
>> that wouldn't be better done at compile-time?
>
> The main application - monitoring changes in the Lisp system after loading the code (see attachment)
>
> Main concept code:
>  (let ((old-all-packages (list-all-packages)))
>    (load *test-file*)
>    (set-difference (list-all-packages)
>                    old-all-packages))
>
> i am don't know need whether add :around-load key, but need tracking changes in lisp image. Example: tracking new packages.
>
>    Moreover, need to check that the component entities will provide such packages: (: file "somefile": provided (: packages (: pkg1: pkg2)))
>
Oh, package management in the context of ASDF: tricky!

Indeed, packages are typically created a compile-time,
while compiling your package.lisp file or equivalent.
So there should be no package created while loading --
at least when building from clean, because when you're
doing an incremental compilation, the package will instead
be created by loading the package.fasl.

Therefore, your around-load package tracking will not be deterministic
in a compiled from clean vs incrementally compiled scenario.
around-compile package tracking will work perfectly from clean,
and from incremental compilation too if you save and restore state to files.

Another solution would be to wrap around an entire system:
it usually makes sense what packages are created by loading a system.
Unhappily, ASDF does not make it easy at all to separate a system
from its dependencies (though it's not conceptually impossible either).

But yes, I understand what you mean in general by tracking change.
However, this is probably something you want to do as part of an
ASDF extension, with a
defmethod perform :around ((op load-op) (c cl-source-file))
so it affects your entire image,
rather than a patch that adds your tracking :around-load
to each and every system you use to use.

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org




More information about the asdf-devel mailing list