diff --git a/source-registry.lisp b/source-registry.lisp index 91bf043f87ed66f092f18ce2beac5c997c85c14d..4c9cd0abd8e6c7aa0860cfc49efccc98cce76204 100644 --- a/source-registry.lisp +++ b/source-registry.lisp @@ -20,7 +20,7 @@ #:default-user-source-registry #:default-system-source-registry #:user-source-registry #:system-source-registry #:user-source-registry-directory #:system-source-registry-directory - #:environment-source-registry #:process-source-registry + #:environment-source-registry #:process-source-registry #:inherit-source-registry #:compute-source-registry #:flatten-source-registry #:sysdef-source-registry-search)) (in-package :asdf/source-registry) @@ -43,6 +43,8 @@ "Either NIL (for uninitialized), or an equal hash-table, mapping system names to pathnames of .asd files") + (defvar *source-registry-parameter* nil) + (defun source-registry-initialized-p () (typep *source-registry* 'hash-table)) @@ -264,7 +266,7 @@ after having found a .asd file? True by default.") (dolist (directive (cdr (validate-source-registry-form form))) (process-source-registry-directive directive :inherit inherit :register register)))) - (defun flatten-source-registry (&optional parameter) + (defun flatten-source-registry (&optional (parameter *source-registry-parameter*)) (remove-duplicates (while-collecting (collect) (with-pathname-defaults () ;; be location-independent @@ -277,7 +279,7 @@ after having found a .asd file? True by default.") :test 'equal :from-end t)) ;; Will read the configuration and initialize all internal variables. - (defun compute-source-registry (&optional parameter (registry *source-registry*)) + (defun compute-source-registry (&optional (parameter *source-registry-parameter*) (registry *source-registry*)) (dolist (entry (flatten-source-registry parameter)) (destructuring-bind (directory &key recurse exclude) entry (let* ((h (make-hash-table :test 'equal))) ; table to detect duplicates @@ -307,8 +309,6 @@ after having found a .asd file? True by default.") h))) (values)) - (defvar *source-registry-parameter* nil) - (defun initialize-source-registry (&optional (parameter *source-registry-parameter*)) ;; Record the parameter used to configure the registry (setf *source-registry-parameter* parameter) diff --git a/test/script-support.lisp b/test/script-support.lisp index fae5cf49fda900956d4c7f5c5e3d9220b70d8290..4b822573d3f7f0473b380c2a8fc14b464d06312b 100644 --- a/test/script-support.lisp +++ b/test/script-support.lisp @@ -40,11 +40,10 @@ Some constraints: (proclaim '(optimize (speed #-gcl 2 #+gcl 1) (safety #-gcl 3 #+gcl 0) #-(or allegro gcl genera) (debug 3) #+(or cmu scl) (c::brevity 2) #+(or cmu scl) (ext:inhibit-warnings 3))) -(defvar *trace-symbols* +(defparameter *trace-symbols* `(;; If you want to trace some stuff while debugging ASDF, ;; here's a nice place to say what. ;; These string designators will be interned in ASDF after it is loaded. - ;;#+ecl ,@'( :perform :input-files :output-files :compile-file* :compile-file-pathname* :load*) )) @@ -426,7 +425,7 @@ is bound, write a message and exit on an error. If (defmacro with-asdf-conditions ((&optional verbose) &body body) `(call-with-asdf-conditions #'(lambda () ,@body) ,verbose)) -(defun compile-asdf (&optional tag verbose upgradep) +(defun compile-asdf (&optional tag (verbose nil) upgradep) (let* ((alisp (asdf-lisp tag)) (afasl (asdf-fasl tag)) (tmp (make-pathname :name "asdf-tmp" :defaults afasl))) @@ -549,6 +548,13 @@ is bound, write a message and exit on an error. If (load-asdf-lisp) (clean-asdf-system)) +(defun hash-table-alist (h) + (loop for k being the hash-keys of h using (hash-value v) collect (cons k v))) + +(defun registry () + (let ((sr (asymval :*source-registry*))) + (when sr (sort (hta sr) 'string< :key 'car)))) + (defun configure-asdf () (format t "Configuring ASDF~%") (when (asym :getenvp) diff --git a/uiop/configuration.lisp b/uiop/configuration.lisp index f1f26b1a624638dcfcef09442eec7c8c6620bac6..cfc54aa3c0a2c846e82dff1d52f8f722246c4688 100644 --- a/uiop/configuration.lisp +++ b/uiop/configuration.lisp @@ -345,7 +345,7 @@ also \"Configuration DSL\"\) in the ASDF manual." (resolve-absolute-location `(,(or (getenv-absolute-directory "XDG_CACHE_HOME") (os-cond - ((os-windows-p) (xdg-data-home "cache")) + ((os-windows-p) (xdg-data-home "cache/")) (t (subpathname* (user-homedir-pathname) ".cache/")))) ,more)))