Skip to content
Snippets Groups Projects
Commit c3f7c73c authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

cl-source-registry-cache.lisp: document the script

Also add a TODO item on how to improve that cache.
And remove an unnecessary debug line.
parent dafb99e8
No related branches found
No related tags found
No related merge requests found
...@@ -417,7 +417,7 @@ It looks like SWANK can be fixed soon, though, so we'll see. ...@@ -417,7 +417,7 @@ It looks like SWANK can be fixed soon, though, so we'll see.
* Faster source-registry: * Faster source-registry:
In addition and/or as a substitute to the .cl-source-registry.cache, ** In addition and/or as a substitute to the .cl-source-registry.cache,
that is meant to be semi-automatically managed, there could be that is meant to be semi-automatically managed, there could be
a cl-source-registry.conf meant for manual management: a cl-source-registry.conf meant for manual management:
when recursing into a source-registry :tree, if such file is present when recursing into a source-registry :tree, if such file is present
...@@ -431,3 +431,8 @@ It looks like SWANK can be fixed soon, though, so we'll see. ...@@ -431,3 +431,8 @@ It looks like SWANK can be fixed soon, though, so we'll see.
both a way of speeding up the build of their software and of both a way of speeding up the build of their software and of
avoiding pollution by test systems that should remain private, avoiding pollution by test systems that should remain private,
and that they can otherwise explicitly enable when they need them. and that they can otherwise explicitly enable when they need them.
** The .cl-source-registry.cache should avoid recursing into
directories that themselves already have a cache or a .conf file,
but instead store the name of these directories,
so these files will be read recursively by asdf, allowing for
semi-modular updates.
#!/usr/bin/cl -sp asdf -E main #!/usr/bin/cl -sp asdf -E main
#|
Usage:
~/common-lisp/asdf/tools/cl-source-registry-cache.lisp ~/common-lisp
will compute a cache of the .asd files under ~/common-lisp//
vastly speeding the future initialization of the source-registry.
To update the cache, run the same command again.
To invalidate the cache, remove the cache file in the same directory:
rm -f ~/common-lisp/.cl-source-registry.cache
|#
(in-package :asdf) (in-package :asdf)
(uiop-debug)
(defun collect-asd (table asd) (defun collect-asd (table asd)
(multiple-value-bind (previous foundp) (multiple-value-bind (previous foundp)
(gethash (pathname-name asd) table) (gethash (pathname-name asd) table)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment