Commit 67f9bb6b authored by Robert Goldman's avatar Robert Goldman

Merge branch 'uiop-upgrade' into 'master'

Uiop upgrade

See merge request asdf/asdf!99
parents 8ffa6386 451b0144
......@@ -3,28 +3,37 @@
;;; ;;;
;;; Free Software available under an MIT-style license. ;;;
;;; ;;;
;;; Copyright (c) 2001-2016 Daniel Barlow and contributors ;;;
;;; Copyright (c) 2001-2018 Daniel Barlow and contributors ;;;
;;; ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package :asdf)
;; We can't rely on it being defined in uiop.asd, since that file isn't loaded.
(defun call-without-redefinition-warnings (thunk)
(handler-bind (((or
#+allegro simple-warning
#+clozure ccl:compiler-warning
#+cmucl kernel:simple-style-warning
#-(or allegro clozure cmucl) warning)
#'muffle-warning))
(funcall thunk)))
;; Note that it's polite to sort the defsystem forms in dependency order,
;; and compulsory to sort them in defsystem-depends-on order.
#+asdf3
(defsystem "asdf/prelude"
;; Note that it's polite to sort the defsystem forms in dependency order,
;; and compulsory to sort them in defsystem-depends-on order.
:version (:read-file-form "version.lisp-expr")
:around-compile call-without-redefinition-warnings ;; we need be the same as uiop
:encoding :utf-8
:components
((:file "header")))
:components ((:file "header")))
#+asdf3
(defsystem "asdf/driver"
;; This is the same as "uiop", but used for transclusion in asdf.lisp.
;; Because asdf.asd can't afford to depend on reading uiop.asd
;; (which would cause circularity, since everything depends on reading asdf.asd),
;; we can't "just" :depends-on ("uiop") like we used to do.
;; Since ASDF 3.3, asdf.asd can't afford to depend on reading uiop.asd,
;; which would cause circularity, since everything depends on reading asdf.asd.
;; Therefore, we can't "just" :depends-on ("uiop") like we used to do, and instead
;; we transclude the list of uiop component into this secondary system.
:pathname "uiop"
:around-compile call-without-redefinition-warnings ;; we need be the same as uiop
:components #.(getf (read-file-form (subpathname *load-pathname* "uiop/uiop.asd") :at 2) :components))
......@@ -86,11 +95,12 @@
:long-description "ASDF builds Common Lisp software organized into defined systems."
:version "3.3.2.5" ;; to be automatically updated by make bump-version
:depends-on ()
#+asdf3 :encoding #+asdf3 :utf-8
:class #+asdf3.1 package-inferred-system #-asdf3.1 system
;; For most purposes, asdf itself specially counts as a builtin system.
;; If you want to link it or do something forbidden to builtin systems,
;; specify separate dependencies on uiop (aka asdf-driver) and asdf/defsystem.
#+asdf3 :builtin-system-p #+asdf3 t
:components ((:module "build" :components ((:file "asdf"))))
:in-order-to (#+asdf3 (prepare-op (monolithic-concatenate-source-op "asdf/defsystem"))))
. #-asdf3 () #+asdf3
(:encoding :utf-8
:class #+asdf3.1 package-inferred-system #-asdf3.1 system
;; For most purposes, asdf itself specially counts as a builtin system.
;; If you want to link it or do something forbidden to builtin systems,
;; specify separate dependencies on uiop (aka asdf/driver) and asdf/defsystem.
:builtin-system-p t
:in-order-to ((prepare-op (monolithic-concatenate-source-op "asdf/defsystem")))))
......@@ -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))))
......
......@@ -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*
......
......@@ -66,8 +66,9 @@
(defun uiop-files ()
"list files in uiop"
(list* "README.md" "uiop.asd" "asdf-driver.asd" "contrib/debug.lisp"
(system-source-files "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"))))
(defun uiop-name ()
(format nil "uiop-~A" (version-from-file)))
(deftestcmd make-uiop-tarball ()
......
......@@ -27,10 +27,6 @@ It is transcluded into asdf.lisp together with ASDF/DEFSYSTEM, so if you did (re
you already have a matching UIOP loaded."
:author "Francois-Rene Rideau"
:licence "MIT"
:class #+asdf3.1 package-system #-asdf3.1 system
#+asdf3.1 :version #+asdf3.1 (:read-file-form "version.lisp" :at (2 2 2))
#+asdf3 :encoding #+asdf3 :utf-8
#+asdf3 :around-compile #+asdf3 call-without-redefinition-warnings
:components
((:static-file "contrib/debug.lisp")
(:file "package")
......@@ -47,4 +43,10 @@ you already have a matching UIOP loaded."
(:file "run-program" :depends-on ("launch-program"))
(:file "configuration" :depends-on ("image"))
(:file "backward-driver" :depends-on ("lisp-build" "run-program" "configuration" "version"))
(:file "driver" :depends-on ("backward-driver"))))
(:file "driver" :depends-on ("backward-driver")))
. #-asdf3 () #+asdf3
(:encoding :utf-8
:around-compile call-without-redefinition-warnings
. #-asdf3.1 () #+asdf3.1
(:class package-system
:version (:read-file-form "version.lisp" :at (2 2 2)))))
......@@ -107,7 +107,7 @@ previously-loaded version of ASDF."
;;; Upon upgrade, specially frob some functions and classes that are being incompatibly redefined
(when-upgrading ()
(let* ((previous-version (first *previous-asdf-versions*))
(redefined-functions ;; List of functions that changes incompatibly since 2.27:
(redefined-functions ;; List of functions that changed incompatibly since 2.27:
;; gf signature changed (should NOT happen), defun that became a generic function,
;; method removed that will mess up with new ones (especially :around :before :after,
;; more specific or call-next-method'ed method) and/or semantics otherwise modified. Oops.
......@@ -118,8 +118,8 @@ previously-loaded version of ASDF."
;; Also note that we don't include the defgeneric=>defun, because they are
;; done directly with defun* and need not trigger a punt on data.
;; See discussion at https://gitlab.common-lisp.net/asdf/asdf/merge_requests/36
`(,@(when (version<= previous-version "3.1.2") '(#:component-depends-on #:input-files)) ;; crucial methods *removed* before 3.1.2
,@(when (version<= previous-version "3.1.7.20") '(#:find-component))))
`(,@(when (version< previous-version "3.1.2") '(#:component-depends-on #:input-files)) ;; crucial methods *removed* before 3.1.2
,@(when (version< previous-version "3.1.7.20") '(#:find-component))))
(redefined-classes
;; redefining the classes causes interim circularities
;; with the old ASDF during upgrade, and many implementations bork
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment