From 65d16a93809e39e556f683ad5e0e17c1eff7469e Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <fare@tunes.org> Date: Wed, 26 Jul 2017 14:04:53 +0000 Subject: [PATCH] Fix more upgrade issues Use :recycle of :asdf/find-system in :asdf/source-registry to migrate symbol initialize-source-registry that moved from that previous packages (otherwise, upgrade from 3.2.1 breaks on all lisps). Also :recycle :asdf/action in :asdf/plan for required-components and traverse-action. But avoid interning plan in asdf/action so it doesn't confuse clisp when upgrading from 2.26(!). --- action.lisp | 4 ++-- find-system.lisp | 1 - lisp-action.lisp | 2 +- plan.lisp | 2 +- source-registry.lisp | 4 ++-- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/action.lisp b/action.lisp index 278d1f763..6d68ffb72 100644 --- a/action.lisp +++ b/action.lisp @@ -7,7 +7,6 @@ (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/session :asdf/component :asdf/operation) (:import-from :asdf/operation #:check-operation-constructor) (:import-from :asdf/component #:%additional-input-files) - #-clisp (:unintern #:required-components #:traverse-action #:traverse-sub-actions) (:export #:action #:define-convenience-action-methods #:action-description #:format-action @@ -431,7 +430,8 @@ They may rely on the order of the files to discriminate between inputs. Updates the action's COMPONENT-OPERATION-TIME to match the COMPUTE-ACTION-STAMP using the JUST-DONE flag.")) - (defgeneric compute-action-stamp (plan operation component &key just-done) + (defgeneric compute-action-stamp (plan- operation component &key just-done) + ;; NB: using plan- rather than plan above allows clisp to upgrade from 2.26(!) (:documentation "Has this action been successfully done already, and at what known timestamp has it been done at or will it be done at? * PLAN is a plan object modelling future effects of actions, diff --git a/find-system.lisp b/find-system.lisp index f5850598a..0a6ae6b51 100644 --- a/find-system.lisp +++ b/find-system.lisp @@ -7,7 +7,6 @@ :asdf/session :asdf/component :asdf/system :asdf/operation :asdf/action :asdf/lisp-action :asdf/find-component :asdf/system-registry :asdf/plan :asdf/operate) (:import-from #:asdf/component #:%additional-input-files) - #+abcl (:intern #:initialize-source-registry) ;; to upgrade from 3.1.x (:export #:find-system #:locate-system #:load-asd #:define-op #:load-system-definition-error #:error-name #:error-pathname #:error-condition)) diff --git a/lisp-action.lisp b/lisp-action.lisp index 221907a4b..8bdeb3bfc 100644 --- a/lisp-action.lisp +++ b/lisp-action.lisp @@ -173,7 +173,7 @@ an OPERATION and a COMPONENT." (defmethod input-files ((o compile-op) (c system)) (when (and *warnings-file-type* (not (builtin-system-p c))) ;; The most correct way to do it would be to use: - ;; (traverse-sub-actions o c :other-systems nil :keep-operation 'compile-op :keep-component 'cl-source-file) + ;; (collect-dependencies o c :other-systems nil :keep-operation 'compile-op :keep-component 'cl-source-file) ;; but it's expensive and we don't care too much about file order or ASDF extensions. (loop :for sub :in (sub-components c :type 'cl-source-file) :nconc (remove-if-not 'warnings-file-p (output-files o sub))))) diff --git a/plan.lisp b/plan.lisp index 61b3abf0b..3f9bf2b40 100644 --- a/plan.lisp +++ b/plan.lisp @@ -4,7 +4,7 @@ (uiop/package:define-package :asdf/plan ;; asdf/action below is needed for required-components, traverse-action and traverse-sub-actions ;; that used to live there before 3.2.0. - (:recycle :asdf/plan :asdf) + (:recycle :asdf/plan :asdf/action :asdf) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/session :asdf/component :asdf/operation :asdf/action :asdf/lisp-action :asdf/system :asdf/system-registry :asdf/find-component :asdf/forcing) diff --git a/source-registry.lisp b/source-registry.lisp index 28ed1feb1..ec3eec371 100644 --- a/source-registry.lisp +++ b/source-registry.lisp @@ -3,9 +3,9 @@ ;;;; See the Manual and https://bugs.launchpad.net/asdf/+bug/485918 (uiop/package:define-package :asdf/source-registry - (:recycle :asdf/source-registry :asdf) + ;; NB: asdf/find-system allows upgrade from <=3.2.1 that have initialize-source-registry there + (:recycle :asdf/source-registry :asdf/find-system :asdf) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/system :asdf/system-registry) - #+abcl (:import-from :asdf/find-system #:initialize-source-registry) ;; to upgrade from 3.1.x (:export #:*source-registry-parameter* #:*default-source-registries* #:invalid-source-registry -- GitLab