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

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