Commit 40c98218 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

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.
parent 40dc8f60
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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")
+5 −6
Original line number Diff line number Diff line
@@ -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.


;;;; -------------------------------------------------------------------------