How to tell if we're being loaded by ASDF?

Faré fahree at gmail.com
Sun Mar 8 23:00:51 UTC 2020


One hacky way is to check whether *asdf-session* is nil or not. For
more precision, check the top of the visiting-action-list of the
*asdf-session* and see if its component has the pathname of your lisp
file (from (uiop:current-lisp-file-pathname)

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
The main reason Santa is so jolly is because
he knows where all the bad girls live.


On Sun, Mar 8, 2020 at 6:23 PM Robert Dodier <robert.dodier at gmail.com> wrote:
>
> Hi, this is a bit off the wall, but maybe there is a way to do it. A
> web search didn't seem to find anything about it.
>
> Is there a way to know that ASDF is loading stuff?
>
> I have this situation. A file might be loaded by ASDF or it might be
> loaded by hand. If it's being loaded by ASDF, then I'd like to do some
> stuff differently.
>
> Why might this file be loaded by hand, why not always use ASDF? Well,
> it's not a Lisp file, it's a Maxima file being loaded by some
> maxima-asdf hackery. I can't count on maxima-asdf working for anybody
> else so I'm expecting that people will load it by hand instead of
> ASDF. But if it is being loaded by ASDF, then I'd like to know that.
>
> Thanks a lot for any info,
>
> Robert Dodier
>



More information about the asdf-devel mailing list