From f71a8b9931aaea80ecb115ebc1f5d4f6a531e87d Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <tunes@google.com> Date: Mon, 27 Jan 2014 01:07:15 -0500 Subject: [PATCH] Cleanups done or initiated during the ASDF Walkthrough. * load-op needn't be sideway, its sideway dependencies are already provided by prepare-op * compile-op should use compile-op (default) not load-op as its downward-operation. * no need for an input-files method for prepare-op, nil is the global default. * Some documentation for compute-action-stamp. * Don't skip upgrade from 1.x on Allegro anymore, since we now correctly punt. * Instead of asdf/package:define-package, use the canonical name uiop/package:define-package --- action.lisp | 2 +- backward-interface.lisp | 2 +- backward-internals.lisp | 2 +- bundle.lisp | 2 +- cache.lisp | 2 +- component.lisp | 2 +- concatenate-source.lisp | 2 +- find-component.lisp | 2 +- find-system.lisp | 2 +- footer.lisp | 2 +- interface.lisp | 2 +- lisp-action.lisp | 10 +++------- operate.lisp | 2 +- operation.lisp | 2 +- output-translations.lisp | 2 +- parse-defsystem.lisp | 2 +- plan.lisp | 19 ++++++++++++++++--- source-registry.lisp | 2 +- system.lisp | 2 +- test/run-tests.sh | 2 -- upgrade.lisp | 4 ++-- user.lisp | 6 ++++-- 22 files changed, 42 insertions(+), 33 deletions(-) diff --git a/action.lisp b/action.lisp index efcb6487a..a07a4135a 100644 --- a/action.lisp +++ b/action.lisp @@ -1,7 +1,7 @@ ;;;; ------------------------------------------------------------------------- ;;;; Actions -(asdf/package:define-package :asdf/action +(uiop/package:define-package :asdf/action (:nicknames :asdf-action) (:recycle :asdf/action :asdf) (:use :uiop/common-lisp :uiop :asdf/upgrade diff --git a/backward-interface.lisp b/backward-interface.lisp index 30c11caec..3b048f125 100644 --- a/backward-interface.lisp +++ b/backward-interface.lisp @@ -1,7 +1,7 @@ ;;;; ------------------------------------------------------------------------- ;;; Backward-compatible interfaces -(asdf/package:define-package :asdf/backward-interface +(uiop/package:define-package :asdf/backward-interface (:recycle :asdf/backward-interface :asdf) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component :asdf/system :asdf/find-system :asdf/operation :asdf/action diff --git a/backward-internals.lisp b/backward-internals.lisp index 07e39c6a0..4eeb97319 100644 --- a/backward-internals.lisp +++ b/backward-internals.lisp @@ -1,7 +1,7 @@ ;;;; ------------------------------------------------------------------------- ;;; Internal hacks for backward-compatibility -(asdf/package:define-package :asdf/backward-internals +(uiop/package:define-package :asdf/backward-internals (:recycle :asdf/backward-internals :asdf) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/system :asdf/component :asdf/operation diff --git a/bundle.lisp b/bundle.lisp index 9c3bfe3c0..029ca14a5 100644 --- a/bundle.lisp +++ b/bundle.lisp @@ -1,7 +1,7 @@ ;;;; ------------------------------------------------------------------------- ;;;; ASDF-Bundle -(asdf/package:define-package :asdf/bundle +(uiop/package:define-package :asdf/bundle (:recycle :asdf/bundle :asdf) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component :asdf/system :asdf/find-system :asdf/find-component :asdf/operation diff --git a/cache.lisp b/cache.lisp index eb5754342..4ca218f4e 100644 --- a/cache.lisp +++ b/cache.lisp @@ -1,7 +1,7 @@ ;;;; ------------------------------------------------------------------------- ;;;; Stamp cache -(asdf/package:define-package :asdf/cache +(uiop/package:define-package :asdf/cache (:use :uiop/common-lisp :uiop :asdf/upgrade) (:export #:get-file-stamp #:compute-file-stamp #:register-file-stamp #:consult-asdf-cache #:do-asdf-cache #:normalize-namestring diff --git a/component.lisp b/component.lisp index 83f13edec..7441749cd 100644 --- a/component.lisp +++ b/component.lisp @@ -1,7 +1,7 @@ ;;;; ------------------------------------------------------------------------- ;;;; Components -(asdf/package:define-package :asdf/component +(uiop/package:define-package :asdf/component (:recycle :asdf/component :asdf/defsystem :asdf/find-system :asdf) (:use :uiop/common-lisp :uiop :asdf/upgrade) (:export diff --git a/concatenate-source.lisp b/concatenate-source.lisp index 533238729..3c7258dad 100644 --- a/concatenate-source.lisp +++ b/concatenate-source.lisp @@ -1,7 +1,7 @@ ;;;; ------------------------------------------------------------------------- ;;;; Concatenate-source -(asdf/package:define-package :asdf/concatenate-source +(uiop/package:define-package :asdf/concatenate-source (:recycle :asdf/concatenate-source :asdf) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component :asdf/operation diff --git a/find-component.lisp b/find-component.lisp index 98f392862..ff6c51be5 100644 --- a/find-component.lisp +++ b/find-component.lisp @@ -1,7 +1,7 @@ ;;;; ------------------------------------------------------------------------- ;;;; Finding components -(asdf/package:define-package :asdf/find-component +(uiop/package:define-package :asdf/find-component (:recycle :asdf/find-component :asdf) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component :asdf/system :asdf/find-system) diff --git a/find-system.lisp b/find-system.lisp index 84d53d275..edfa6d422 100644 --- a/find-system.lisp +++ b/find-system.lisp @@ -1,7 +1,7 @@ ;;;; ------------------------------------------------------------------------- ;;;; Finding systems -(asdf/package:define-package :asdf/find-system +(uiop/package:define-package :asdf/find-system (:recycle :asdf/find-system :asdf) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component :asdf/system :asdf/cache) diff --git a/footer.lisp b/footer.lisp index b0828343b..692415b9f 100644 --- a/footer.lisp +++ b/footer.lisp @@ -1,7 +1,7 @@ ;;;; ----------------------------------------------------------------------- ;;;; ASDF Footer: last words and cleanup -(asdf/package:define-package :asdf/footer +(uiop/package:define-package :asdf/footer (:recycle :asdf/footer :asdf) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/operate :asdf/bundle)) (in-package :asdf/footer) diff --git a/interface.lisp b/interface.lisp index d2e860fdb..17170b6d1 100644 --- a/interface.lisp +++ b/interface.lisp @@ -1,7 +1,7 @@ ;;;; --------------------------------------------------------------------------- ;;;; Handle ASDF package upgrade, including implementation-dependent magic. -(asdf/package:define-package :asdf/interface +(uiop/package:define-package :asdf/interface (:nicknames :asdf :asdf-utilities) (:recycle :asdf/interface :asdf) (:unintern diff --git a/lisp-action.lisp b/lisp-action.lisp index 6adc154f4..32a877ea2 100644 --- a/lisp-action.lisp +++ b/lisp-action.lisp @@ -1,7 +1,7 @@ ;;;; ------------------------------------------------------------------------- ;;;; Actions to build Common Lisp software -(asdf/package:define-package :asdf/lisp-action +(uiop/package:define-package :asdf/lisp-action (:recycle :asdf/lisp-action :asdf) (:intern #:proclamations #:flags) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/cache @@ -39,13 +39,12 @@ (with-upgradability () (defclass prepare-op (upward-operation sideway-operation) ((sideway-operation :initform 'load-op :allocation :class))) - (defclass load-op (basic-load-op downward-operation sideway-operation selfward-operation) + (defclass load-op (basic-load-op downward-operation selfward-operation) ;; NB: even though compile-op depends on prepare-op it is not needed-in-image-p, ;; so we need to directly depend on prepare-op for its side-effects in the current image. ((selfward-operation :initform '(prepare-op compile-op) :allocation :class))) (defclass compile-op (basic-compile-op downward-operation selfward-operation) - ((selfward-operation :initform 'prepare-op :allocation :class) - (downward-operation :initform 'load-op :allocation :class))) + ((selfward-operation :initform 'prepare-op :allocation :class))) (defclass prepare-source-op (upward-operation sideway-operation) ((sideway-operation :initform 'load-source-op :allocation :class))) @@ -66,9 +65,6 @@ (defmethod perform ((o prepare-op) (c component)) (declare (ignorable o c)) nil) - (defmethod input-files ((o prepare-op) (c component)) - (declare (ignorable o c)) - nil) (defmethod input-files ((o prepare-op) (s system)) (declare (ignorable o)) (if-let (it (system-source-file s)) (list it)))) diff --git a/operate.lisp b/operate.lisp index c8c8f66cf..eb0b82d02 100644 --- a/operate.lisp +++ b/operate.lisp @@ -1,7 +1,7 @@ ;;;; ------------------------------------------------------------------------- ;;;; Invoking Operations -(asdf/package:define-package :asdf/operate +(uiop/package:define-package :asdf/operate (:recycle :asdf/operate :asdf) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component :asdf/system :asdf/operation :asdf/action diff --git a/operation.lisp b/operation.lisp index 6949114fc..4719d27a0 100644 --- a/operation.lisp +++ b/operation.lisp @@ -1,7 +1,7 @@ ;;;; ------------------------------------------------------------------------- ;;;; Operations -(asdf/package:define-package :asdf/operation +(uiop/package:define-package :asdf/operation (:recycle :asdf/operation :asdf/action :asdf) ;; asdf/action for FEATURE pre 2.31.5. (:use :uiop/common-lisp :uiop :asdf/upgrade) (:export diff --git a/output-translations.lisp b/output-translations.lisp index 265876556..8aaa50801 100644 --- a/output-translations.lisp +++ b/output-translations.lisp @@ -1,7 +1,7 @@ ;;;; --------------------------------------------------------------------------- ;;;; asdf-output-translations -(asdf/package:define-package :asdf/output-translations +(uiop/package:define-package :asdf/output-translations (:recycle :asdf/output-translations :asdf) (:use :uiop/common-lisp :uiop :asdf/upgrade) (:export diff --git a/parse-defsystem.lisp b/parse-defsystem.lisp index f1b792410..851d873cd 100644 --- a/parse-defsystem.lisp +++ b/parse-defsystem.lisp @@ -1,7 +1,7 @@ ;;;; ------------------------------------------------------------------------- ;;;; Defsystem -(asdf/package:define-package :asdf/parse-defsystem +(uiop/package:define-package :asdf/parse-defsystem (:recycle :asdf/parse-defsystem :asdf/defsystem :asdf) (:nicknames :asdf/defsystem) ;; previous name, to be compatible with, in case anyone cares (:use :uiop/common-lisp :asdf/driver :asdf/upgrade diff --git a/plan.lisp b/plan.lisp index a7cfb1fd8..8107b474b 100644 --- a/plan.lisp +++ b/plan.lisp @@ -1,7 +1,7 @@ ;;;; ------------------------------------------------------------------------- ;;;; Plan -(asdf/package:define-package :asdf/plan +(uiop/package:define-package :asdf/plan (:recycle :asdf/plan :asdf) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component :asdf/operation :asdf/system @@ -198,8 +198,21 @@ the action of OPERATION on COMPONENT in the PLAN")) stamp) (defmethod compute-action-stamp (plan (o operation) (c component) &key just-done) - ;; In a distant future, get-file-stamp and component-operation-time - ;; shall also be parametrized by the plan, or by a second model object. + ;; Given an action, figure out at what time in the past it has been done, + ;; or if it has just been done, return the time that it has. + ;; Returns two values: + ;; 1- the TIMESTAMP of the action if it has already been done and is up to date, + ;; or T is either hasn't been done or is out of date. + ;; 2- the DONE-IN-IMAGE-P boolean flag that is T if the action has already been done + ;; in the current image, or NIL if it hasn't. + ;; Note that if e.g. LOAD-OP only depends on up-to-date files, but + ;; hasn't been done in the current image yet, then it can have a non-T timestamp, + ;; yet a NIL done-in-image-p flag. + ;; + ;; In a distant future, get-file-stamp, component-operation-time and latest-stamp + ;; shall also be parametrized by the plan, or by a second model object, + ;; so they need not refer to the state of the filesystem, + ;; and the stamps could be cryptographic checksums rather than timestamps. (let* ((stamp-lookup #'(lambda (o c) (if-let (it (plan-action-status plan o c)) (action-stamp it) t))) (out-files (output-files o c)) diff --git a/source-registry.lisp b/source-registry.lisp index cd7ab5ae1..872e6b778 100644 --- a/source-registry.lisp +++ b/source-registry.lisp @@ -2,7 +2,7 @@ ;;;; Source Registry Configuration, by Francois-Rene Rideau ;;;; See the Manual and https://bugs.launchpad.net/asdf/+bug/485918 -(asdf/package:define-package :asdf/source-registry +(uiop/package:define-package :asdf/source-registry (:recycle :asdf/source-registry :asdf) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/find-system) (:export diff --git a/system.lisp b/system.lisp index 40a8324f9..1e5447347 100644 --- a/system.lisp +++ b/system.lisp @@ -1,7 +1,7 @@ ;;;; ------------------------------------------------------------------------- ;;;; Systems -(asdf/package:define-package :asdf/system +(uiop/package:define-package :asdf/system (:recycle :asdf :asdf/system) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component) (:export diff --git a/test/run-tests.sh b/test/run-tests.sh index 22e632e47..db96c6292 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -393,8 +393,6 @@ valid_upgrade_test_p () { # It's damn slow. Also, for some reason, we punt on anything earlier than 2.25, # and only need to test it once, below for 2.24. abcl:1.*|abcl:2.00[0-9]:*|abcl:201[0-9]:*|abcl:2.2[0-3]:*) : ;; - # Skip allegro modern on 1.x -- fails for rpgoldman on his mac (!) - allegromodern:1.*) : ;; # ccl fasl numbering broke loading of old asdf 2.0 ccl:2.0[01]*) : ;; # My old ubuntu 10.04LTS clisp 2.44.1 came wired in diff --git a/upgrade.lisp b/upgrade.lisp index d6cfcf4b0..f24e113c6 100644 --- a/upgrade.lisp +++ b/upgrade.lisp @@ -2,7 +2,7 @@ ;;;; Handle upgrade as forward- and backward-compatibly as possible ;; See https://bugs.launchpad.net/asdf/+bug/485687 -(asdf/package:define-package :asdf/upgrade +(uiop/package:define-package :asdf/upgrade (:recycle :asdf/upgrade :asdf) (:use :uiop/common-lisp :uiop) (:export @@ -12,7 +12,7 @@ #:*post-upgrade-cleanup-hook* #:*post-upgrade-restart-hook* #:cleanup-upgraded-asdf ;; There will be no symbol left behind! #:intern*) - (:import-from :asdf/package #:intern* #:find-symbol*)) + (:import-from :uiop/package #:intern* #:find-symbol*)) (in-package :asdf/upgrade) ;;; Special magic to detect if this is an upgrade diff --git a/user.lisp b/user.lisp index a49f76bff..0cf642477 100644 --- a/user.lisp +++ b/user.lisp @@ -1,6 +1,8 @@ ;;;; --------------------------------------------------------------------------- ;;;; ASDF-USER, where the action happens. -(asdf/package:define-package :asdf/user +(uiop/package:define-package :asdf/user (:nicknames :asdf-user) - (:use :asdf/common-lisp :asdf/package :asdf/interface)) + ;; TODO: it would be nice to have :UIOP in the list, + ;; but we need test compatibility with cl-test-grid first. + (:use :uiop/common-lisp :uiop/package :asdf/interface)) -- GitLab