Commit 815a1833 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Fix upgrade issues on ABCL and ECL

Fix upgrade on ABCL, that failed to properly process the fact that
initialize-source-registry had moved from asdf/find-system to
asdf/source-registry, yet was called in a cleanup function.

Fix upgrade on ECL, that failed to correctly process that
find-component was fmakunbound.
It also seems to clear *central-registry* in some upgrade scenarios
(that also moved from find-system to system-registry).

Tweak script-support to not unconditionally frob-packages
when ASDF isn't loaded yet, and to not include the asdf directory
when loading and testing only UIOP.
parent 41f397c9
......@@ -7,6 +7,7 @@
:asdf/session :asdf/component :asdf/system :asdf/operation :asdf/action :asdf/lisp-action
:asdf/find-component :asdf/system-registry :asdf/plan :asdf/operate)
(:import-from #:asdf/component #:%additional-input-files)
#+abcl (:intern #:initialize-source-registry) ;; to upgrade from 3.1.x
#:find-system #:locate-system #:load-asd #:define-op
#:load-system-definition-error #:error-name #:error-pathname #:error-condition))
......@@ -5,6 +5,7 @@
(uiop/package:define-package :asdf/source-registry
(:recycle :asdf/source-registry :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/system :asdf/system-registry)
#+abcl (:import-from :asdf/find-system #:initialize-source-registry) ;; to upgrade from 3.1.x
#:*source-registry-parameter* #:*default-source-registries*
......@@ -449,7 +449,7 @@ is bound, write a message and exit on an error. If
(quietly (load (asdf-fasl tag))))
(defun register-directory (dir)
(pushnew dir (symbol-value (asym :*central-registry*))))
(pushnew dir (symbol-value (asym :*central-registry*)) :test #'equal))
(defun load-asdf-system (&rest keys)
......@@ -659,10 +659,14 @@ is bound, write a message and exit on an error. If
(defun frob-packages ()
((find-package :asdf)
(format t "Frob packages~%")
(use-package :asdf :asdf-test)
(when (find-package :uiop) (use-package :uiop :asdf-test))
(when (find-package :asdf/session) (use-package :asdf/session :asdf-test))
(when (find-package :asdf/session) (use-package :asdf/session :asdf-test)))
(format t "NB: No packages to frob, because ASDF not loaded yet.")))
(setf *package* (find-package :asdf-test))
......@@ -673,12 +677,17 @@ is bound, write a message and exit on an error. If
(and (member :asdf2 *features*) (acall :version-satisfies (acall :asdf-version) "2.11.4"))))
(leave-test "UIOP will break ASDF < 2.011.4 - skipping test." 0))
(register-directory *asdf-directory*)
;; do NOT include *asdf-directory*, which would defeat the purpose by causing an upgrade
(register-directory *uiop-directory*)
(register-directory *test-directory*)
(format t "CR ~S~%" (symbol-value (asym :*central-registry*)))
(format t "loading uiop~%")
(acall :oos (asym :load-op) :uiop))
(acall :oos (asym :load-op) :test-module-depend))
(format t "CR ~S~%" (symbol-value (asym :*central-registry*)))
(format t "loading test-module-depend~%")
(acall :oos (asym :load-op) :test-module-depend)
(format t "done loading~%"))
(defun load-asdf (&optional tag)
(load-asdf-fasl tag)
......@@ -106,7 +106,8 @@ previously-loaded version of ASDF."
;;; Upon upgrade, specially frob some functions and classes that are being incompatibly redefined
(when-upgrading ()
(let ((redefined-functions ;; List of functions that changes incompatibly since 2.27:
(let* ((previous-version (first *previous-asdf-versions*))
(redefined-functions ;; List of functions that changes 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.
......@@ -117,9 +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
'(#:component-depends-on #:input-files ;; methods removed before 3.1.2
#:find-component ;; gf modified in
`(,@(when (version<= previous-version "3.1.2") '(#:component-depends-on #:input-files)) ;; crucial methods *removed* before 3.1.2
,@(when (version<= previous-version "") '(#:find-component))))
;; 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