From 40c98218b8bfe54b410bfe681cfeb487456d4c8b Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <fare@tunes.org> Date: Mon, 25 Oct 2010 02:54:01 -0700 Subject: [PATCH] 2.143: tweak find-system-fallback in a vain attempt to solve lp#665724. Actually, there's no way to automatically make sure that the ASDF version number is consistent between the asdf.asd and the asdf.lisp, lest we have scripts that enforce it at checkin or checkout time. --- asdf.asd | 1 + asdf.lisp | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/asdf.asd b/asdf.asd index 0645d3a89..a41c812a6 100644 --- a/asdf.asd +++ b/asdf.asd @@ -12,6 +12,7 @@ :licence "MIT" :description "Another System Definition Facility" :long-description "ASDF builds Common Lisp software organized into defined systems." + ;;:version #.(asdf:asdf-version) ; how do we make that the *described* ASDF's version rather than the *previously loaded* ASDF's version? :depends-on () :components ((:file "asdf") diff --git a/asdf.lisp b/asdf.lisp index ae2098eb4..d5e107236 100644 --- a/asdf.lisp +++ b/asdf.lisp @@ -72,7 +72,7 @@ (defvar *asdf-version* nil) (defvar *upgraded-p* nil) (let* ((asdf-version ;; the 1+ helps the version bumping script discriminate - (subseq "VERSION:2.142" (1+ (length "VERSION")))) + (subseq "VERSION:2.143" (1+ (length "VERSION")))) (existing-asdf (fboundp 'find-system)) (existing-version *asdf-version*) (already-there (equal asdf-version existing-version))) @@ -1298,22 +1298,21 @@ Going forward, we recommend new users should be using the source-registry. (setf (gethash (coerce-name name) *defined-systems*) (cons (get-universal-time) system))) -(defun* find-system-fallback (requested fallback &optional source-file) +(defun* find-system-fallback (requested fallback &rest keys &key source-file &allow-other-keys) (setf fallback (coerce-name fallback) source-file (or source-file *compile-file-truename* *load-truename*) requested (coerce-name requested)) (when (equal requested fallback) (let* ((registered (cdr (gethash fallback *defined-systems*))) (system (or registered - (make-instance - 'system :name fallback - :source-file source-file)))) + (apply 'make-instance 'system + :name fallback :source-file source-file keys)))) (unless registered (register-system fallback system)) (throw 'find-system system)))) (defun* sysdef-find-asdf (name) - (find-system-fallback name "asdf")) + (find-system-fallback name "asdf")) ;; :version *asdf-version* wouldn't be updated when ASDF is updated. ;;;; ------------------------------------------------------------------------- -- GitLab