Commit 90b32a83 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Reckon as the oldest-forward-compatible-version

We just re-defined the signature of find-component and it needs to be fmakunbound.
component-depends-on and input-files have some :around methods removed at 3.1.2
and it's safer to fmakunbound them if inherited from earlier versions.
All other functions seem A-OK since 2.27, and we punt on 2.26 and earlier.

See discussion in
parent 45c7bf75
......@@ -52,38 +52,40 @@
(setf asdf::*asdf-version* "3.0")
(clear-system "asdf")
(defparameter *count* 0)
(defmethod operation-done-p :after ((load-op operation) (c system))
(defmethod input-files :after ((load-op operation) (c system))
(incf *count*))
(operation-done-p 'load-op "asdf")
(assert-equal *count* 1)
(input-files 'load-op "asdf")
(assert-equal *count* 3)
(with-expected-failure (#+xcl t)
;; expected-failure: XCL has trouble with the ASDF upgrade
(load-system :asdf)
(assert-pathname-equal (subpathname *asdf-directory* "asdf.asd")
(system-source-file (find-system :asdf))))
;; Upgrading from an old-enough version redefined away the operation-done-p method!
(setf *count* 2)
(operation-done-p 'load-op "asdf")
(assert-equal *count* 2)
;; Upgrading from an old-enough version redefined away the input-files method!
(setf *count* 4)
(input-files 'load-op "asdf")
(assert-equal *count* 4)
;; The data-punting upgrade will mess up component identity, so clear the cache
(setf asdf::*asdf-version* asdf/upgrade::*oldest-forward-compatible-asdf-version*)
(clear-system "asdf")
(setf *count* 3)
(defmethod operation-done-p :after ((load-op operation) (c system))
(setf *count* 5)
(defmethod input-files :after ((load-op operation) (c system))
(incf *count*))
(operation-done-p 'load-op "asdf")
(assert-equal *count* 4)
(input-files 'load-op "uiop")
(assert-equal *count* 8)
(with-expected-failure (#+xcl t)
;; expected-failure: XCL has trouble with the ASDF upgrade
(load-system :asdf))
;; Upgrading from an recent-enough version, the operation-done-p method was preserved!
(setf *count* 5)
(operation-done-p 'load-op "asdf")
(assert-equal *count* 6)
;; Upgrading from an recent-enough version, the input-files method was preserved!
;; But we need to clear the cache for it not to be short-circuited.
(setf *count* 9)
(input-files 'load-op "uiop")
(assert-equal *count* 12)
;;; disabling this test on windows since it relies on running make-asdf.bat, which
;;; does not work for me under cygwin. - rpg 2016-03-20
......@@ -46,10 +46,8 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO
(defvar *asdf-version* nil)
;; We need to clear systems from versions older than the one in this (private) parameter.
;; The latest incompatible defclass is 2.32.13 renaming a slot in component;
;; the latest incompatible defgeneric is TBD;
;; there is a defgeneric => defun in so lacking per-function fmakunbound for now,
;; this will be our cut-off version.
(defparameter *oldest-forward-compatible-asdf-version* "")
;; the latest incompatible gf change is in (see redefined-functions below).
(defparameter *oldest-forward-compatible-asdf-version* "")
;; Semi-private variable: a designator for a stream on which to output ASDF progress messages
(defvar *verbose-out* nil)
;; Private function by which ASDF outputs progress messages and warning messages:
......@@ -106,20 +104,20 @@ previously-loaded version of ASDF."
;;; Upon upgrade, specially frob some functions and classes that are being incompatibly redefined
(when-upgrading ()
(let ((redefined-functions ;; gf signature and/or semantics changed incompatibly. Oops.
(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.
;; TODO: We should probably remove a few of these functions now that we wholly punt
;; on ASDF 2.26 or earlier; however determining which for sure is a huge pain,
;; because it requires inspecting each and every release since 2.27 or so.
;; Note that we don't include the defgeneric=>defun, because they are
;; 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.
;; So these are only for defun=>defgeneric, modified defgeneric and *method removed*.
'(#:component-depends-on #:output-files #:input-files #:operation-done-p
#:perform #:perform-with-restarts #:traverse #:explain #:operate
#:trivial-system-p #:component-relative-pathname #:source-file-type
#:component-parent-pathname #:find-component #:process-source-registry
#:find-system #:system-source-file))
;; See discussion at
'(#:component-depends-on #:input-files ;; methods removed before 3.1.2
#:find-component ;; gf modified in
;; redefining the classes causes interim circularities
;; with the old ASDF during upgrade, and many implementations bork
Supports Markdown
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