CLHS says that "The variable *modules* is deprecated."
How one is to track the loaded files then?
--
__Pascal_Bourguignon__ http://www.informatimago.com/
----------------------------------------------------------------------
Do not adjust your mind, there is a fault in reality.
Tim Bradshaw <···@cley.com> writes:
> * Pascal Bourguignon wrote:
> > How one is to track the loaded files then?
>
> *MODULES* does not track loaded files.
ex. CLHS:
The value of *modules* is a list of names of the modules that have
been loaded into the current Lisp image.
provide adds the module-name to the list held by *modules*, if
such a name is not already present.
Right, but when you put one (PROVIDE 'FILE-X) in file-x.lisp that you
load with (REQUIRE 'FILE-X "file-x.lisp"), you get in *MODULES* a list
that is isomorph to the list of loaded file.
--
__Pascal_Bourguignon__ http://www.informatimago.com/
----------------------------------------------------------------------
Do not adjust your mind, there is a fault in reality.
In article <··············@thalassa.informatimago.com>,
Pascal Bourguignon <····@thalassa.informatimago.com> wrote:
>Right, but when you put one (PROVIDE 'FILE-X) in file-x.lisp that you
>load with (REQUIRE 'FILE-X "file-x.lisp"), you get in *MODULES* a list
>that is isomorph to the list of loaded file.
Except that not all files end with a PROVIDE call that names the file, so
it's only isomorphic to the list of loaded files that use PROVIDE. If a
module consists of multiple files, I'd expect only the last one to call
PROVIDE.
Anyway, it's trivial to do it with your own function:
(defvar *my-modules* ())
(defun my-provide (module-name)
(pushnew module-name *my-modules*))
--
Barry Margolin, ··············@level3.com
Genuity Managed Services, a Level(3) Company, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
In article <··············@thalassa.informatimago.com>,
Pascal Bourguignon <····@thalassa.informatimago.com> wrote:
> CLHS says that "The variable *modules* is deprecated."
>
> How one is to track the loaded files then?
These things are not covered by the spec, AFAIK. You are mostly on your
own if you don't use defsystem or asdf, or something along these lines.
Pascal
Pascal Bourguignon <····@thalassa.informatimago.com> writes:
> CLHS says that "The variable *modules* is deprecated."
>
> How one is to track the loaded files then?
The provide/require/*modules* combo has been discussed here recently
(albeit not in much detail). The most interesting posting would
probably be
<http://groups.google.com/groups?&selm=4wuhnbz70.fsf%40beta.franz.com>,
especially the link at the end.
Regards
Henrik