Commit 2cdd7104 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Stop having asdf.asd depend on uiop.asd

A DEFINE-OP "asdf" shouldn't depend on a DEFINE-OP "uiop", or
a circular dependency may be introduced by the "always load asdf first"
behavior. Instead, have asdf/driver do a low-level copy of the components
in uiop, rather than a transclusion of a system defined in a separate file.
parent dd518370
...@@ -21,7 +21,13 @@ ...@@ -21,7 +21,13 @@
#+asdf3 #+asdf3
(defsystem "asdf/driver" (defsystem "asdf/driver"
:depends-on ("uiop")) ;; 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.
: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))
#+asdf3 #+asdf3
(defsystem "asdf/defsystem" (defsystem "asdf/defsystem"
...@@ -40,7 +46,7 @@ ...@@ -40,7 +46,7 @@
:build-operation monolithic-concatenate-source-op :build-operation monolithic-concatenate-source-op
:build-pathname "build/asdf" ;; our target :build-pathname "build/asdf" ;; our target
:around-compile call-without-redefinition-warnings ;; we need be the same as uiop :around-compile call-without-redefinition-warnings ;; we need be the same as uiop
:depends-on ("asdf/prelude" "uiop") :depends-on ("asdf/prelude" "asdf/driver")
:encoding :utf-8 :encoding :utf-8
:components :components
((:file "upgrade") ((:file "upgrade")
......
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
(def-test-system "fooey") (def-test-system "fooey")
(def-test-system "foo") (def-test-system "foo")
(defmethod input-files :after ((o load-op) (c system)) (defmethod input-files :after ((o load-op) (c system))
(tick)) (DBG :input-files-after-1 o c
(tick)))
(assert-equal *ticks* 0) (assert-equal *ticks* 0)
(input-files 'load-op "foo") (input-files 'load-op "foo")
(assert-equal *ticks* 1) (assert-equal *ticks* 1)
...@@ -108,10 +109,10 @@ ...@@ -108,10 +109,10 @@
(def-test-system "fooey") (def-test-system "fooey")
(setf *ticks* 10) (setf *ticks* 10)
(defmethod input-files :after ((o load-op) (c system)) (defmethod input-files :after ((o load-op) (c system))
(DBG :input-files o c) (DBG :input-files-after-2 o c
(incf *ticks*)) (tick)))
(input-files 'load-op "uiop") (input-files 'load-op "uiop")
(assert-equal *ticks* 11) (assert-equal *ticks* 12)
(with-expected-failure (#+xcl t) (with-expected-failure (#+xcl t)
;; expected-failure: XCL has trouble with the ASDF upgrade ;; expected-failure: XCL has trouble with the ASDF upgrade
(load-system :asdf)) (load-system :asdf))
......
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