Commit 90fb36de authored by Robert Goldman's avatar Robert Goldman

Merge branch 'defgeneric-upgrade' into 'master'

Stop fmakunbound'ing defgeneric's past the upgrade trigger

Avoid using `fmakunbound` unless necessary, and clear registered systems if we do.

Audit existing gf's and conclude that only `component-depends-on`,  `input-files` and `find-component` need it, and that the `*oldest-forward-compatible-version*` is 3.1.7.20.

This is a response to https://bugs.launchpad.net/asdf/+bug/1631771

See merge request !36
parents c261a97a e69904a8
......@@ -78,8 +78,8 @@ SCL ?= scl
XCL ?= xcl
header_lisp := header.lisp
driver_lisp := uiop/package.lisp uiop/common-lisp.lisp uiop/utility.lisp uiop/os.lisp uiop/pathname.lisp uiop/filesystem.lisp uiop/stream.lisp uiop/image.lisp uiop/run-program.lisp uiop/lisp-build.lisp uiop/configuration.lisp uiop/backward-driver.lisp uiop/driver.lisp
defsystem_lisp := upgrade.lisp component.lisp system.lisp cache.lisp find-system.lisp find-component.lisp operation.lisp action.lisp lisp-action.lisp plan.lisp operate.lisp output-translations.lisp source-registry.lisp parse-defsystem.lisp bundle.lisp concatenate-source.lisp package-inferred-system.lisp backward-internals.lisp backward-interface.lisp interface.lisp user.lisp footer.lisp
driver_lisp := uiop/package.lisp uiop/common-lisp.lisp uiop/utility.lisp uiop/os.lisp uiop/pathname.lisp uiop/filesystem.lisp uiop/stream.lisp uiop/image.lisp uiop/lisp-build.lisp uiop/run-program.lisp uiop/configuration.lisp uiop/backward-driver.lisp uiop/driver.lisp
defsystem_lisp := upgrade.lisp cache.lisp component.lisp system.lisp find-system.lisp find-component.lisp operation.lisp action.lisp lisp-action.lisp plan.lisp operate.lisp parse-defsystem.lisp bundle.lisp concatenate-source.lisp output-translations.lisp source-registry.lisp package-inferred-system.lisp backward-interface.lisp backward-internals.lisp interface.lisp user.lisp footer.lisp
all_lisp := $(header_lisp) $(driver_lisp) $(defsystem_lisp)
print-% : ; @echo $* = $($*)
......
......@@ -117,7 +117,7 @@ Use it in FORMAT control strings as ~/asdf-action:format-action/"
;;;; Dependencies
(with-upgradability ()
(defgeneric* (component-depends-on) (operation component) ;; ASDF4: rename to component-dependencies
(defgeneric component-depends-on (operation component) ;; ASDF4: rename to component-dependencies
(:documentation
"Returns a list of dependencies needed by the component to perform
the operation. A dependency has one of the following forms:
......@@ -270,7 +270,7 @@ The class needs to be updated for ASDF 3.1 and specify appropriate propagation m
;;;; Inputs, Outputs, and invisible dependencies
(with-upgradability ()
(defgeneric* (output-files) (operation component)
(defgeneric output-files (operation component)
(:documentation "Methods for this function return two values: a list of output files
corresponding to this action, and a boolean indicating if they have already been subjected
to relevant output translations and should not be further translated.
......@@ -278,13 +278,13 @@ to relevant output translations and should not be further translated.
Methods on PERFORM *must* call this function to determine where their outputs are to be located.
They may rely on the order of the files to discriminate between outputs.
"))
(defgeneric* (input-files) (operation component)
(defgeneric input-files (operation component)
(:documentation "A list of input files corresponding to this action.
Methods on PERFORM *must* call this function to determine where their inputs are located.
They may rely on the order of the files to discriminate between inputs.
"))
(defgeneric* (operation-done-p) (operation component)
(defgeneric operation-done-p (operation component)
(:documentation "Returns a boolean which is NIL if the action must be performed (again)."))
(define-convenience-action-methods output-files (operation component))
(define-convenience-action-methods input-files (operation component))
......@@ -294,8 +294,7 @@ They may rely on the order of the files to discriminate between inputs.
t)
;; Translate output files, unless asked not to. Memoize the result.
(defmethod output-files :around (operation component)
operation component ;; hush genera, not convinced by declare ignorable(!)
(defmethod output-files :around ((operation t) (component t))
(do-asdf-cache `(output-files ,operation ,component)
(values
(multiple-value-bind (pathnames fixedp) (call-next-method)
......@@ -397,7 +396,7 @@ in some previous image, or T if it needs to be done.")
;;;; Perform
(with-upgradability ()
(defgeneric* (perform) (operation component)
(defgeneric perform (operation component)
(:documentation "PERFORM an action, consuming its input-files and building its output-files"))
(define-convenience-action-methods perform (operation component))
......@@ -418,7 +417,7 @@ in some previous image, or T if it needs to be done.")
;; The restarts of the perform-with-restarts variant matter in an interactive context.
;; The retry strategies of p-w-r itself, and/or the background workers of a multiprocess build
;; may call perform directly rather than call p-w-r.
(defgeneric* (perform-with-restarts) (operation component)
(defgeneric perform-with-restarts (operation component)
(:documentation "PERFORM an action in a context where suitable restarts are in place."))
(defmethod perform-with-restarts (operation component)
(perform operation component))
......
......@@ -44,9 +44,9 @@
:encoding :utf-8
:components
((:file "upgrade")
(:file "cache" :depends-on ("upgrade"))
(:file "component" :depends-on ("upgrade"))
(:file "system" :depends-on ("component"))
(:file "cache" :depends-on ("upgrade"))
(:file "find-system" :depends-on ("system" "cache"))
(:file "find-component" :depends-on ("find-system"))
(:file "operation" :depends-on ("find-system"))
......@@ -54,14 +54,14 @@
(:file "lisp-action" :depends-on ("action"))
(:file "plan" :depends-on ("lisp-action"))
(:file "operate" :depends-on ("plan"))
(:file "output-translations" :depends-on ("operate"))
(:file "source-registry" :depends-on ("find-system"))
(:file "parse-defsystem" :depends-on ("cache" "system" "lisp-action" "operate"))
(:file "bundle" :depends-on ("lisp-action" "operate" "parse-defsystem"))
(:file "concatenate-source" :depends-on ("plan" "parse-defsystem" "bundle"))
(:file "output-translations" :depends-on ("operate"))
(:file "source-registry" :depends-on ("find-system"))
(:file "package-inferred-system" :depends-on ("system" "find-system" "parse-defsystem"))
(:file "backward-internals" :depends-on ("find-system" "parse-defsystem"))
(:file "backward-interface" :depends-on ("operate" "output-translations"))
(:file "backward-internals" :depends-on ("find-system" "parse-defsystem"))
(:file "interface" :depends-on
("parse-defsystem" "concatenate-source"
"output-translations" "source-registry" "package-inferred-system"
......
......@@ -74,7 +74,7 @@ if that's whay you mean." ;;)
;; TRAVERSE is the function used to compute a plan in ASDF 1 and 2.
;; It was never officially exposed but some people still used it.
(defgeneric* (traverse) (operation component &key &allow-other-keys)
(defgeneric traverse (operation component &key &allow-other-keys)
(:documentation
"Generate and return a plan for performing OPERATION on COMPONENT.
......@@ -189,7 +189,7 @@ Please use UIOP:RUN-PROGRAM instead."
;;; This method survives from ASDF 1, but really it is superseded by action-description.
(with-upgradability ()
(defgeneric* (explain) (operation component)
(defgeneric explain (operation component)
(:documentation "Display a message describing an action.
DEPRECATED. Use ASDF:ACTION-DESCRIPTION and/or ASDF::FORMAT-ACTION instead."))
(defmethod explain ((o operation) (c component))
......
......@@ -303,7 +303,7 @@ or of opaque libraries shipped along the source code."))
:force :force-not :plan-class) ;; TODO: refactor so we don't mix plan and operation arguments
(operation-original-initargs instance))))
(defgeneric* (trivial-system-p) (component))
(defgeneric trivial-system-p (component))
(defun user-system-p (s)
(and (typep s 'system)
......
......@@ -49,7 +49,7 @@
(:documentation "Top-level system containing the COMPONENT"))
(defgeneric component-pathname (component)
(:documentation "Pathname of the COMPONENT if any, or NIL."))
(defgeneric* (component-relative-pathname) (component)
(defgeneric component-relative-pathname (component)
;; in ASDF4, rename that to component-specified-pathname ?
(:documentation "Specified pathname of the COMPONENT,
intended to be merged with the pathname of that component's parent if any, using merged-pathnames*.
......@@ -78,7 +78,7 @@ or NIL for top-level components (a.k.a. systems)"))
;; Deprecated: Backward compatible way of computing the FILE-TYPE of a component.
;; TODO: find users, have them stop using that, remove it for ASDF4.
(defgeneric* (source-file-type) (component system)
(defgeneric source-file-type (component system)
(:documentation "DEPRECATED. Use the FILE-TYPE of a COMPONENT instead."))
(define-condition system-definition-error (error) ()
......@@ -232,7 +232,7 @@ typically but not necessarily representing the files in a subdirectory of the bu
;;;; component pathnames
(with-upgradability ()
(defgeneric* (component-parent-pathname) (component)
(defgeneric component-parent-pathname (component)
(:documentation "The pathname of the COMPONENT's parent, if any, or NIL"))
(defmethod component-parent-pathname (component)
(component-pathname (component-parent component)))
......
......@@ -63,7 +63,7 @@ into a single file"))
:with around-compile = (around-compile-hook s)
:with other-around-compile = '()
:for c :in (required-components
s :goal-operation 'compile-op
s :goal-operation 'load-op
:keep-operation 'compile-op
:other-systems (operation-monolithic-p operation))
:append
......
......@@ -50,7 +50,7 @@
;;;; Finding components
(with-upgradability ()
(defgeneric* (find-component) (base path &key registered)
(defgeneric find-component (base path &key registered)
(:documentation "Find a component by resolving the PATH starting from BASE parent.
If REGISTERED is true, only search currently registered systems."))
(defgeneric resolve-dependency-combination (component combinator arguments)
......
......@@ -4,8 +4,8 @@
set here=%~dp0
set header_lisp=header.lisp
set driver_lisp=uiop\package.lisp + uiop\common-lisp.lisp + uiop\utility.lisp + uiop\os.lisp + uiop\pathname.lisp + uiop\filesystem.lisp + uiop\stream.lisp + uiop\image.lisp + uiop\run-program.lisp + uiop\lisp-build.lisp + uiop\configuration.lisp + uiop\backward-driver.lisp + uiop\driver.lisp
set defsystem_lisp=upgrade.lisp + component.lisp + system.lisp + cache.lisp + find-system.lisp + find-component.lisp + operation.lisp + action.lisp + lisp-action.lisp + plan.lisp + operate.lisp + output-translations.lisp + source-registry.lisp + parse-defsystem.lisp + bundle.lisp + concatenate-source.lisp + package-inferred-system.lisp + backward-internals.lisp + backward-interface.lisp + interface.lisp + user.lisp + footer.lisp
set driver_lisp=uiop\package.lisp + uiop\common-lisp.lisp + uiop\utility.lisp + uiop\os.lisp + uiop\pathname.lisp + uiop\filesystem.lisp + uiop\stream.lisp + uiop\image.lisp + uiop\lisp-build.lisp + uiop\run-program.lisp + uiop\configuration.lisp + uiop\backward-driver.lisp + uiop\driver.lisp
set defsystem_lisp=upgrade.lisp + cache.lisp + component.lisp + system.lisp + find-system.lisp + find-component.lisp + operation.lisp + action.lisp + lisp-action.lisp + plan.lisp + operate.lisp + parse-defsystem.lisp + bundle.lisp + concatenate-source.lisp + output-translations.lisp + source-registry.lisp + package-inferred-system.lisp + backward-interface.lisp + backward-internals.lisp + interface.lisp + user.lisp + footer.lisp
%~d0
cd %~p0
......
......@@ -5,8 +5,8 @@
here="$(dirname $0)"
header_lisp="header.lisp"
driver_lisp="uiop/package.lisp uiop/common-lisp.lisp uiop/utility.lisp uiop/os.lisp uiop/pathname.lisp uiop/filesystem.lisp uiop/stream.lisp uiop/image.lisp uiop/run-program.lisp uiop/lisp-build.lisp uiop/configuration.lisp uiop/backward-driver.lisp uiop/driver.lisp"
defsystem_lisp="upgrade.lisp component.lisp system.lisp cache.lisp find-system.lisp find-component.lisp operation.lisp action.lisp lisp-action.lisp plan.lisp operate.lisp output-translations.lisp source-registry.lisp parse-defsystem.lisp bundle.lisp concatenate-source.lisp package-inferred-system.lisp backward-internals.lisp backward-interface.lisp interface.lisp user.lisp footer.lisp"
driver_lisp="uiop/package.lisp uiop/common-lisp.lisp uiop/utility.lisp uiop/os.lisp uiop/pathname.lisp uiop/filesystem.lisp uiop/stream.lisp uiop/image.lisp uiop/lisp-build.lisp uiop/run-program.lisp uiop/configuration.lisp uiop/backward-driver.lisp uiop/driver.lisp"
defsystem_lisp="upgrade.lisp cache.lisp component.lisp system.lisp find-system.lisp find-component.lisp operation.lisp action.lisp lisp-action.lisp plan.lisp operate.lisp parse-defsystem.lisp bundle.lisp concatenate-source.lisp output-translations.lisp source-registry.lisp package-inferred-system.lisp backward-interface.lisp backward-internals.lisp interface.lisp user.lisp footer.lisp"
all () {
# Default action: bootstrap asdf.lisp
......
......@@ -16,7 +16,7 @@
(in-package :asdf/operate)
(with-upgradability ()
(defgeneric* (operate) (operation component &key &allow-other-keys)
(defgeneric operate (operation component &key &allow-other-keys)
(:documentation
"Operate does mainly four things for the user:
......@@ -208,7 +208,7 @@ the implementation's REQUIRE rather than by internal ASDF mechanisms."))
(*modules-being-required* (cons module *modules-being-required*)))
(assert (null (component-children s)))
;; CMUCL likes its module names to be all upcase.
(require #-cmucl module #+cmucl (string-upcase module))))
(require (nest #+cmucl (string-upcase) module))))
(defmethod resolve-dependency-combination (component (combinator (eql :require)) arguments)
(unless (and (length=n-p arguments 1)
......
......@@ -22,9 +22,9 @@
))
(in-package :asdf/output-translations)
;; (setf output-translations) at some point used to be a macro for the sake of
;; obsolete versions of GCL. Make sure that macro doesn't come to haunt us.
(when-upgrading () (undefine-function '(setf output-translations)))
;; (setf output-translations) between 2.27 and 3.0.3 was using a defsetf macro
;; for the sake of obsolete versions of GCL 2.6. Make sure it doesn't come to haunt us.
(when-upgrading (:version "3.1.2") (fmakunbound '(setf output-translations)))
(with-upgradability ()
(define-condition invalid-output-translation (invalid-configuration warning)
......
......@@ -230,7 +230,7 @@ after having found a .asd file? True by default.")
;;; Process the source-registry configuration
(defgeneric* (process-source-registry) (spec &key inherit register))
(defgeneric process-source-registry (spec &key inherit register))
(defun* (inherit-source-registry) (inherit &key register)
(when inherit
......
......@@ -24,12 +24,12 @@
(with-upgradability ()
;; The method is actually defined in asdf/find-system,
;; but we declare the function here to avoid a forward reference.
(defgeneric* (find-system) (system &optional error-p)
(defgeneric find-system (system &optional error-p)
(:documentation "Given a system designator, find the actual corresponding system object.
If no system is found, then signal an error if ERROR-P is true (the default), or else return NIL.
A system designator is usually a string (conventionally all lowercase) or a symbol, designating
the same system as its downcased name; it can also be a system object (designating itself)."))
(defgeneric* (system-source-file :supersede #-clisp t #+clisp nil) (system)
(defgeneric system-source-file (system)
(:documentation "Return the source file in which system is defined."))
;; This is bad design, but was the easiest kluge I found to let the user specify that
;; some special actions create outputs at locations controled by the user that are not affected
......
......@@ -420,6 +420,9 @@ valid_upgrade_test_p () {
abcl:1.*|abcl:2.00[0-9]:*|abcl:201[0-9]:*|abcl:2.2[0-3]:*) : ;;
# ccl fasl numbering broke loading of old asdf 2.0
ccl:2.0[01]*) : ;;
# Allegro ships with versions 3*, so give up testing 2
# Also, unpatched Allegro 10 has bug updating from 2.26 and before
allegro*:[12].*) : ;;
# My old ubuntu 10.04LTS clisp 2.44.1 came wired in
# with an antique ASDF 1.374 from CLC that can't be downgraded.
# More recent CLISPs work.
......
......@@ -47,14 +47,53 @@
;; This time we found it, but it was skipped because the version was the same
(assert-equal nil (system-source-file (find-system :asdf)))
;; But if we cheat on our version, that should work
(setf asdf::*asdf-version* "3.0")
(clear-system "asdf")
#-xcl ;; 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)))
(def-test-system "fooey")
(defparameter *ticks* 0)
(defun tick () (incf *ticks*))
(defmethod input-files :after ((load-op operation) (c system)) (tick))
(input-files 'load-op "asdf")
(assert-equal *ticks* 3)
(assert (find-system "fooey" nil))
(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 input-files method!
(setf *ticks* 4)
(input-files 'load-op "asdf")
(assert-equal *ticks* 4)
;; It also cleared away previously defined systems
(assert (not (find-system "fooey" nil)))
;; The data-punting upgrade will mess up component identity, so clear the cache
(clear-cache)
(setf asdf::*asdf-version* asdf/upgrade::*oldest-forward-compatible-asdf-version*)
(clear-system "asdf")
(def-test-system "fooey")
(setf *ticks* 5)
(defmethod input-files :after ((load-op operation) (c system))
(incf *ticks*))
(input-files 'load-op "uiop")
(assert-equal *ticks* 8)
(with-expected-failure (#+xcl t)
;; expected-failure: XCL has trouble with the ASDF upgrade
(load-system :asdf))
;; Upgrading from a recent-enough version, the input-files method was preserved!
;; But we need to clear the cache for it not to be short-circuited.
(clear-cache)
(assert (find-system "fooey" nil))
(setf *ticks* 9)
(eval '(input-files 'load-op "uiop"))
(assert-equal *ticks* 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
......@@ -71,8 +110,8 @@
(DBG "Checking that the bootstrap script and asdf.asd are in synch")
(defun system-lisp-files (system)
(loop :for f :in (required-components system :keep-component 'cl-source-file)
:collect (enough-pathname (component-pathname f) *asdf-directory*)))
(loop :for f :in (input-files 'concatenate-source-op system)
:collect (enough-pathname f *asdf-directory*)))
(defun bootstrap-lisp-files (target)
(let ((target (format nil "~a := " target)))
......
......@@ -13,18 +13,9 @@
:collect (enough-namestring! p b)))
(defun system-source-files (system &key monolithic)
(let* ((sys (find-system system))
(components
(required-components system
:other-systems monolithic
:goal-operation 'load-op
:keep-operation 'load-op
:keep-component 'file-component))
(dir (ensure-pathname
(system-source-directory sys)
:want-absolute t :want-directory t))
(pathnames (mapcar 'component-pathname components)))
(enough-namestrings dir pathnames)))
(let ((system (find-system system)))
(enough-namestrings (system-source-directory system)
(input-files 'concatenate-source-op system))))
;;; Making release tarballs for asdf, asdf/defsystem, uiop.
......
......@@ -42,8 +42,8 @@ you already have a matching UIOP loaded."
(:file "filesystem" :depends-on ("os" "pathname"))
(:file "stream" :depends-on ("filesystem"))
(:file "image" :depends-on ("stream"))
(:file "run-program" :depends-on ("stream"))
(:file "lisp-build" :depends-on ("image"))
(:file "run-program" :depends-on ("stream"))
(:file "configuration" :depends-on ("image"))
(:file "backward-driver" :depends-on ("lisp-build" "run-program" "configuration"))
(:file "driver" :depends-on ("backward-driver"))))
......@@ -12,7 +12,7 @@
;; magic helper to define debugging functions:
#:uiop-debug #:load-uiop-debug-utility #:*uiop-debug-utility*
#:with-upgradability ;; (un)defining functions in an upgrade-friendly way
#:undefine-function #:undefine-functions #:defun* #:defgeneric*
#:defun* #:defgeneric*
#:nest #:if-let ;; basic flow control
#:while-collecting #:appendf #:length=n-p #:ensure-list ;; lists
#:remove-plist-keys #:remove-plist-key ;; plists
......@@ -43,24 +43,6 @@
;; even if the signature and/or generic-ness of the function has changed.
;; For a generic function, this invalidates any previous DEFMETHOD.
(eval-when (:load-toplevel :compile-toplevel :execute)
(defun undefine-function (function-spec)
(cond
((symbolp function-spec)
;; undefining the previous function is the portable way
;; of overriding any incompatible previous gf,
;; but CLISP needs extra help with getting rid of previous methods.
#+clisp
(let ((f (and (fboundp function-spec) (fdefinition function-spec))))
(when (typep f 'clos:standard-generic-function)
(loop :for m :in (clos:generic-function-methods f)
:do (remove-method f m))))
(fmakunbound function-spec))
((and (consp function-spec) (eq (car function-spec) 'setf)
(consp (cdr function-spec)) (null (cddr function-spec)))
(fmakunbound function-spec))
(t (error "bad function spec ~S" function-spec))))
(defun undefine-functions (function-spec-list)
(map () 'undefine-function function-spec-list))
(macrolet
((defdef (def* def)
`(defmacro ,def* (name formals &rest rest)
......@@ -72,8 +54,8 @@
`(progn
;; We usually try to do it only for the functions that need it,
;; which happens in asdf/upgrade - however, for ECL, we need this hammer.
,@(when (or supersede #+(or clasp ecl) t)
`((undefine-function ',name)))
,@(when supersede
`((fmakunbound ',name)))
,@(when (and #+(or clasp ecl) (symbolp name)) ; fails for setf functions on ecl
`((declaim (notinline ,name))))
(,',def ,name ,formals ,@rest))))))
......
......@@ -35,17 +35,19 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO
(defvar *previous-asdf-versions*
(let ((previous (asdf-version)))
(when previous
;; Punt on hard package upgrade: from ASDF1 or ASDF2
;; Punt on upgrade from ASDF1 or ASDF2, by renaming (or deleting) the package.
(when (version< previous "2.27") ;; 2.27 is the first to have the :asdf3 feature.
(let ((away (format nil "~A-~A" :asdf previous)))
(rename-package :asdf away)
(when *load-verbose*
(format t "~&; Renamed old ~A package away to ~A~%" :asdf away)))))
(list previous)))
(format t "~&; Renamed old ~A package away to ~A~%" :asdf away))))
(list previous))))
;; This public variable will be bound shortly to the currently loaded version of ASDF.
(defvar *asdf-version* nil)
;; We need to clear systems from versions older than the one in this (private) parameter:
(defparameter *oldest-forward-compatible-asdf-version* "2.33") ;; 2.32.13 renames a slot in component.
;; 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 gf change is in 3.1.7.20 (see redefined-functions below).
(defparameter *oldest-forward-compatible-asdf-version* "3.1.7.20")
;; 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:
......@@ -102,20 +104,29 @@ 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.
;; NB: it's too late to do anything about functions in UIOP!
;; If you introduce some critically incompatibility there, you must change name.
'()) ;; empty now that we don't unintern, but wholly punt on ASDF 2.26 or earlier.
(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
'((#:compile-concatenated-source-op (#:operation) ()))))
;; redefining the classes causes interim circularities
;; with the old ASDF during upgrade, and many implementations bork
'((#:compile-concatenated-source-op (#:operation) ()))))
(loop :for name :in redefined-functions
:for sym = (find-symbol* name :asdf nil) :do
(when sym
;; CLISP seemingly can't fmakunbound and define a function in the same fasl. Sigh.
#-clisp (fmakunbound sym)))
(labels ((asym (x) (multiple-value-bind (s p) (if (consp x) (values (car x) (cadr x)) (values x :asdf))
:for sym = (find-symbol* name :asdf nil)
:do (when sym (fmakunbound sym)))
(labels ((asym (x) (multiple-value-bind (s p)
(if (consp x) (values (car x) (cadr x)) (values x :asdf))
(find-symbol* s p nil)))
(asyms (l) (mapcar #'asym l)))
(loop* :for (name superclasses slots) :in redefined-classes
......
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