Commit 451b0144 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau Committed by Robert P. Goldman
Browse files

Deal with UIOP only being seen if strictly newer

Since ASDF 3.3, a same-version uiop.asd isn't even seen by find-system
so we need to update a few other files to account for it.
Tweak and comment the corresponding code in find-system.
parent c09b3664
Loading
Loading
Loading
Loading
+8 −1
Changes for bundle.lisp: 8 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -523,8 +523,15 @@ which is probably not what you want; you probably need to tweak your output tran
                     :static-library (resolve-symlinks* pathname))))

  (defun linkable-system (x)
    (or (if-let (s (find-system x))
    (or ;; If the system is available as source, use it.
        (if-let (s (find-system x))
          (and (output-files 'lib-op s) s))
        ;; If an ASDF upgrade is available from source, but not a UIOP upgrade to that,
        ;; then use the asdf/driver system instead of
        ;; the UIOP that was disabled by check-not-old-asdf-system.
        (if-let (s (and (equal x "uiop") (output-files 'lib-op "asdf") (find-system "asdf/driver")))
          (and (output-files 'lib-op s) s))
        ;; If there was no source upgrade, look for modules provided by the implementation.
        (if-let (p (system-module-pathname (coerce-name x)))
          (make-prebuilt-system x p))))

+9 −5
Changes for find-system.lisp: 9 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -141,8 +141,9 @@ Do NOT try to load a .asd file directly with CL:LOAD. Always use ASDF:LOAD-ASD."
  (defvar *old-asdf-systems* (make-hash-table :test 'equal))

  ;; (Private) function to check that a system that was found isn't an asdf downgrade.
  ;; Returns T if everything went right, NIL if the system was an ASDF of the same or older version,
  ;; that shall not be loaded. Also issue a warning if it was a strictly older version of ASDF.
  ;; Returns T if everything went right, NIL if the system was an ASDF at an older version,
  ;; or UIOP of the same or older version, that shall not be loaded.
  ;; Also issue a warning if it was a strictly older version of ASDF.
  (defun check-not-old-asdf-system (name pathname)
    (or (not (member name '("asdf" "uiop") :test 'equal))
        (null pathname)
@@ -153,9 +154,12 @@ Do NOT try to load a .asd file directly with CL:LOAD. Always use ASDF:LOAD-ASD."
                             (read-file-form version-pathname :at (if asdfp '(0) '(2 2 2)))))
               (old-version (asdf-version)))
          (cond
            ;; Don't load UIOP of the exact same version: we already loaded it as part of ASDF.
            ((and (equal old-version version) (equal name "uiop")) nil)
            ((version<= old-version version) t) ;; newer or same version: Good!
            ;; Same version is OK for ASDF, to allow loading from modified source.
            ;; However, do *not* load UIOP of the exact same version:
            ;; it was already loaded it as part of ASDF and would only be double-loading.
            ;; Be quiet about it, though, since it's a normal situation.
            ((equal old-version version) asdfp)
            ((version< old-version version) t) ;; newer version: Good!
            (t ;; old version: bad
             (ensure-gethash
              (list (namestring pathname) version) *old-asdf-systems*
+2 −1
Changes for tools/release.lisp: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -66,8 +66,9 @@

(defun uiop-files ()
  "list files in uiop"
  (let ((*asdf-version* "3")) ;; prevent check-not-old-asdf-system from hiding uiop.asd.
    (list* "README.md" "uiop.asd" "asdf-driver.asd" "contrib/debug.lisp"
         (system-source-files "uiop")))
           (system-source-files "uiop"))))
(defun uiop-name ()
  (format nil "uiop-~A" (version-from-file)))
(deftestcmd make-uiop-tarball ()