Commit fb9f2301 authored by Robert Goldman's avatar Robert Goldman
Browse files

Add distinguished warning class for ASDF load issues.

This will allow us to trap and test for correct Allegro warning.
parent e9acc16b
Pipeline #6025 passed with stage
......@@ -84,8 +84,10 @@
#+(and allegro allegro-v10.1) ;; check for patch needed for upgradeability
(unless (assoc "ma040" (cdr (assoc :lisp sys:*patches*)) :test 'equal)
(warn "On Allegro Common Lisp 10.1, patch pma040 is needed for correct ASDF upgrading. ~
Please update your Allegro image using (SYS:UPDATE-ALLEGRO)."))
(warn 'asdf-install-warning
:format-control "On Allegro Common Lisp 10.1, patch pma040 is ~
needed for correct ASDF upgrading. Please update your Allegro image ~
using (SYS:UPDATE-ALLEGRO)."))
;; Advertise the features we provide.
(dolist (f '(:asdf :asdf2 :asdf3 :asdf3.1 :asdf3.2 :asdf3.3)) (pushnew f *features*))
......
......@@ -12,7 +12,8 @@
#:*post-upgrade-cleanup-hook* #:cleanup-upgraded-asdf
;; There will be no symbol left behind!
#:with-asdf-deprecation
#:intern*)
#:intern*
#:asdf-install-warning)
(:import-from :uiop/package #:intern* #:find-symbol*))
(in-package :asdf/upgrade)
......@@ -173,6 +174,19 @@ previously-loaded version of ASDF."
(call-functions (reverse *post-upgrade-cleanup-hook*)))
t))))
(define-condition asdf-install-warning (simple-condition warning)
((format-control
:initarg :format-control)
(format-arguments
:initarg :format-arguments
:initform nil))
(:documentation "Warning class for issues related to upgrading or loading ASDF.")
(:report (lambda (c s)
(format s "WARNING: ~?"
(slot-value c 'format-control)
(slot-value c 'format-arguments)))))
(defun upgrade-asdf ()
"Try to upgrade of ASDF. If a different version was used, return T.
We need do that before we operate on anything that may possibly depend on 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