Commit 3dd1f67d authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Remove *post-upgrade-restart-hook*

p-u-r-h was never called! Two functions were registered.
Register them with *post-upgrade-cleanup-hook* instead.
The hook was introduced with pre-release 2.27,
possibly with the intent to be called by the main operate :around method
when an asdf build is restarted in the middle. But that never happened.
parent b0eb3f7a
......@@ -159,7 +159,7 @@ then define and register said preloaded system."
This function is run whenever ASDF is upgraded."
(loop :for name :being :the :hash-keys :of *preloaded-systems*
:do (ensure-preloaded-system-registered name)))
(register-hook-function '*post-upgrade-restart-hook* 'ensure-all-preloaded-systems-registered)
(register-hook-function '*post-upgrade-cleanup-hook* 'ensure-all-preloaded-systems-registered)
(defun register-preloaded-system (system-name &rest keys &key (version t) &allow-other-keys)
"Register a system as being preloaded. If the system has not been loaded from the filesystem
......
......@@ -267,7 +267,7 @@ the implementation's REQUIRE rather than by internal ASDF mechanisms."))
:when (eq (first k) 'find-system) :collect (second k))))
(clrhash *asdf-cache*)
(dolist (s l) (find-system s nil)))))
(register-hook-function '*post-upgrade-restart-hook* 'restart-upgraded-asdf)
(register-hook-function '*post-upgrade-cleanup-hook* 'restart-upgraded-asdf)
;; The following function's symbol is from asdf/find-system.
;; It is defined here to resolve what would otherwise be forward package references.
......
......@@ -9,7 +9,7 @@
#:asdf-version #:*previous-asdf-versions* #:*asdf-version*
#:asdf-message #:*verbose-out*
#:upgrading-p #:when-upgrading #:upgrade-asdf #:defparameter*
#:*post-upgrade-cleanup-hook* #:*post-upgrade-restart-hook* #:cleanup-upgraded-asdf
#:*post-upgrade-cleanup-hook* #:cleanup-upgraded-asdf
;; There will be no symbol left behind!
#:intern*)
(:import-from :uiop/package #:intern* #:find-symbol*))
......@@ -53,11 +53,6 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO
(when *verbose-out* (apply 'format *verbose-out* format-string format-args)))
;; Private hook for functions to run after ASDF has upgraded itself from an older variant:
(defvar *post-upgrade-cleanup-hook* ())
;; Private hook for functions to run after ASDF is restarted, whether by starting a process
;; from a dumped image or after upgrading from an older variant:
;; TODO: understand what happened with that hook, why functions are registered on it but it is
;; never called anymore. This is a bug that should be fixed before next release (3.1.8)!
(defvar *post-upgrade-restart-hook* ())
;; Private function to detect whether the current upgrade counts as an incompatible
;; data schema upgrade implying the need to drop data.
(defun upgrading-p (&optional (oldest-compatible-version *oldest-forward-compatible-asdf-version*))
......
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