Dr Rama Lakshmanan
Dr Rama Lakshmanan

Reputation: 67

How Can I Find Symbols (and Source Files) of a loaded ASDF System

I have a situation in which I have some ASDF3 Systems which all share a common package.

I would like to know how I can find all symbols that were defined by just one of them. Is there a way to collect these? It would also be helpful to be able to determine the pathname of the source file in which a given symbol is defined.

I appreciate that best practice would dictate use of individual packages per system, but I have some reasons for not doing that just now. (I can rethink this if absolutely necessary.)

Upvotes: 1

Views: 66

Answers (1)

Svante
Svante

Reputation: 51501

No. ASDF has no knowledge of the contents of the systems and files it loads.

A system is a collection of files plus some metadata describing their dependency topology (among others). There is nothing that prescribes that the files even have to be Lisp files.

What you can try is to ask your Lisp implementation from which file it loaded e. g. a function definition, and then infer from the file name and location the system it might belong to (assuming that your systems do not use the same files).

Upvotes: 1

Related Questions