From c3f7c73ce02fceb660e396854522a3df9a559ee4 Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <tunes@google.com> Date: Fri, 10 Jul 2015 00:35:32 -0400 Subject: [PATCH] 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. --- TODO | 7 ++++++- tools/cl-source-registry-cache.lisp | 11 +++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index daa4978fa..1143981e5 100644 --- a/TODO +++ b/TODO @@ -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. diff --git a/tools/cl-source-registry-cache.lisp b/tools/cl-source-registry-cache.lisp index 59dd1ddf2..596fa56d8 100755 --- a/tools/cl-source-registry-cache.lisp +++ b/tools/cl-source-registry-cache.lisp @@ -1,9 +1,16 @@ #!/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) -- GitLab