diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-04-30 19:04:59 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-04-30 19:05:18 -0700 |
commit | 4e356a11bfe43202e17532506258603220151b28 (patch) | |
tree | a7d4e7cbe80f355514413b82e22f5cfceeb38044 /src/data.lisp | |
parent | 56d22586e049692983821f7de9dbdce7948763e6 (diff) | |
download | consfigurator-4e356a11bfe43202e17532506258603220151b28.tar.gz |
RESET-DATA-SOURCES: also reset cache of items of STRING-DATA
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/data.lisp')
-rw-r--r-- | src/data.lisp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/data.lisp b/src/data.lisp index e04802c..2861cd0 100644 --- a/src/data.lisp +++ b/src/data.lisp @@ -99,6 +99,9 @@ sources are not expected to be available outside of the root Lisp.")) (defvar *no-data-sources* nil "If t, silently fail to register any data sources.") +(defvar *string-data* (make-hash-table :test #'equal) + "Items of STRING-DATA obtained from data sources by this Lisp image.") + (defun try-register-data-source (&rest args) "Register sources of prerequisite data. This function is typically called in consfigs. Any relative pathnames in ARGS @@ -124,9 +127,11 @@ as, before being passed to implementations of REGISTER-DATA-SOURCE." (invoke-restart 'skip-data-source)) (defun reset-data-sources () - "Forget all data sources registered in this Lisp image. + "Forget all data sources registered in this Lisp image and items of string +data obtained from data sources by this Lisp image. This function is typically called at the REPL." - (setq *data-sources* nil + (setq *string-data* (clrhash *string-data*) + *data-sources* nil *data-source-registrations* nil)) (defun get-data-string (iden1 iden2) @@ -155,9 +160,6 @@ This function is called by property :APPLY and :UNAPPLY subroutines." (format stream "Could not provide prerequisite data ~S | ~S" (missing-iden1 condition) (missing-iden2 condition))))) -(defvar *string-data* (make-hash-table :test #'equal) - "Items of STRING-DATA obtained from data sources by this Lisp image.") - (defun %get-data (iden1 iden2) (let* ((idenpair (cons iden1 iden2)) (from-source (query-data-sources iden1 iden2)) |