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
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -417,7 +417,7 @@ It looks like SWANK can be fixed soon, though, so we'll see.


* 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
   a cl-source-registry.conf meant for manual management:
   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.
   both a way of speeding up the build of their software and of
   avoiding pollution by test systems that should remain private,
   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.
+9 −2
Original line number Diff line number Diff line
#!/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)

(uiop-debug)

(defun collect-asd (table asd)
  (multiple-value-bind (previous foundp)
      (gethash (pathname-name asd) table)