diff --git a/find-system.lisp b/find-system.lisp index 0a6ae6b516b9a95e373c4332ddd69065c844ba33..f5850598a0206c847581ac0ea28f9c28f3151c2d 100644 --- a/find-system.lisp +++ b/find-system.lisp @@ -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 (:export #:find-system #:locate-system #:load-asd #:define-op #:load-system-definition-error #:error-name #:error-pathname #:error-condition)) diff --git a/source-registry.lisp b/source-registry.lisp index bcfe266c87c076b68b79a1689990b7350e1f7614..28ed1feb1e883b3e101de2588fe3008b4d5a81e7 100644 --- a/source-registry.lisp +++ b/source-registry.lisp @@ -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 (:export #:*source-registry-parameter* #:*default-source-registries* #:invalid-source-registry diff --git a/test/script-support.lisp b/test/script-support.lisp index 670620ebc0c1018ce52e2981ba10105ebd9feacc..936055d7db815d585b11770d42d828887c9efb80 100644 --- a/test/script-support.lisp +++ b/test/script-support.lisp @@ -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) (quietly @@ -659,10 +659,14 @@ is bound, write a message and exit on an error. If t) (defun frob-packages () - (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)) + (cond + ((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))) + (t + (format t "NB: No packages to frob, because ASDF not loaded yet."))) (setf *package* (find-package :asdf-test)) t) @@ -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)) (configure-asdf) - (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~%") (quietly (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) diff --git a/upgrade.lisp b/upgrade.lisp index e11acc2cf6aa5b11ca1cbce5d799201395bd079c..1599b94df4bc1be69c5c8fd348c0605aae222a34 100644 --- a/upgrade.lisp +++ b/upgrade.lisp @@ -106,32 +106,32 @@ 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: - ;; 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. - ;; NB: it's too late to do anything about functions in UIOP! - ;; If you introduce some critical incompatibility there, you must change the function name. - ;; Note that we don't need do anything about functions that changed incompatibly - ;; from ASDF 2.26 or earlier: we wholly punt on the entire ASDF package in such an upgrade. - ;; 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 - '(#:component-depends-on #:input-files ;; methods removed before 3.1.2 - #:find-component ;; gf modified in 3.1.7.20 - )) - (redefined-classes - ;; redefining the classes causes interim circularities - ;; with the old ASDF during upgrade, and many implementations bork - #-clozure () - #+clozure - '((#:compile-concatenated-source-op (#:operation) ()) - (#:compile-bundle-op (#:operation) ()) - (#:concatenate-source-op (#:operation) ()) - (#:dll-op (#:operation) ()) - (#:lib-op (#:operation) ()) - (#:monolithic-compile-bundle-op (#:operation) ()) - (#:monolithic-concatenate-source-op (#:operation) ())))) + (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. + ;; NB: it's too late to do anything about functions in UIOP! + ;; If you introduce some critical incompatibility there, you must change the function name. + ;; Note that we don't need do anything about functions that changed incompatibly + ;; from ASDF 2.26 or earlier: we wholly punt on the entire ASDF package in such an upgrade. + ;; 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)))) + (redefined-classes + ;; redefining the classes causes interim circularities + ;; with the old ASDF during upgrade, and many implementations bork + #-clozure () + #+clozure + '((#:compile-concatenated-source-op (#:operation) ()) + (#:compile-bundle-op (#:operation) ()) + (#:concatenate-source-op (#:operation) ()) + (#:dll-op (#:operation) ()) + (#:lib-op (#:operation) ()) + (#:monolithic-compile-bundle-op (#:operation) ()) + (#:monolithic-concatenate-source-op (#:operation) ())))) (loop :for name :in redefined-functions :for sym = (find-symbol* name :asdf nil) :do (when sym (fmakunbound sym)))