Commit f71a8b99 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

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
parent f8a8d149
;;;; ------------------------------------------------------------------------- ;;;; -------------------------------------------------------------------------
;;;; Actions ;;;; Actions
(asdf/package:define-package :asdf/action (uiop/package:define-package :asdf/action
(:nicknames :asdf-action) (:nicknames :asdf-action)
(:recycle :asdf/action :asdf) (:recycle :asdf/action :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade (:use :uiop/common-lisp :uiop :asdf/upgrade
......
;;;; ------------------------------------------------------------------------- ;;;; -------------------------------------------------------------------------
;;; Backward-compatible interfaces ;;; Backward-compatible interfaces
(asdf/package:define-package :asdf/backward-interface (uiop/package:define-package :asdf/backward-interface
(:recycle :asdf/backward-interface :asdf) (:recycle :asdf/backward-interface :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade (:use :uiop/common-lisp :uiop :asdf/upgrade
:asdf/component :asdf/system :asdf/find-system :asdf/operation :asdf/action :asdf/component :asdf/system :asdf/find-system :asdf/operation :asdf/action
......
;;;; ------------------------------------------------------------------------- ;;;; -------------------------------------------------------------------------
;;; Internal hacks for backward-compatibility ;;; Internal hacks for backward-compatibility
(asdf/package:define-package :asdf/backward-internals (uiop/package:define-package :asdf/backward-internals
(:recycle :asdf/backward-internals :asdf) (:recycle :asdf/backward-internals :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade (:use :uiop/common-lisp :uiop :asdf/upgrade
:asdf/system :asdf/component :asdf/operation :asdf/system :asdf/component :asdf/operation
......
;;;; ------------------------------------------------------------------------- ;;;; -------------------------------------------------------------------------
;;;; ASDF-Bundle ;;;; ASDF-Bundle
(asdf/package:define-package :asdf/bundle (uiop/package:define-package :asdf/bundle
(:recycle :asdf/bundle :asdf) (:recycle :asdf/bundle :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade (:use :uiop/common-lisp :uiop :asdf/upgrade
:asdf/component :asdf/system :asdf/find-system :asdf/find-component :asdf/operation :asdf/component :asdf/system :asdf/find-system :asdf/find-component :asdf/operation
......
;;;; ------------------------------------------------------------------------- ;;;; -------------------------------------------------------------------------
;;;; Stamp cache ;;;; Stamp cache
(asdf/package:define-package :asdf/cache (uiop/package:define-package :asdf/cache
(:use :uiop/common-lisp :uiop :asdf/upgrade) (:use :uiop/common-lisp :uiop :asdf/upgrade)
(:export #:get-file-stamp #:compute-file-stamp #:register-file-stamp (:export #:get-file-stamp #:compute-file-stamp #:register-file-stamp
#:consult-asdf-cache #:do-asdf-cache #:normalize-namestring #:consult-asdf-cache #:do-asdf-cache #:normalize-namestring
......
;;;; ------------------------------------------------------------------------- ;;;; -------------------------------------------------------------------------
;;;; Components ;;;; Components
(asdf/package:define-package :asdf/component (uiop/package:define-package :asdf/component
(:recycle :asdf/component :asdf/defsystem :asdf/find-system :asdf) (:recycle :asdf/component :asdf/defsystem :asdf/find-system :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade) (:use :uiop/common-lisp :uiop :asdf/upgrade)
(:export (:export
......
;;;; ------------------------------------------------------------------------- ;;;; -------------------------------------------------------------------------
;;;; Concatenate-source ;;;; Concatenate-source
(asdf/package:define-package :asdf/concatenate-source (uiop/package:define-package :asdf/concatenate-source
(:recycle :asdf/concatenate-source :asdf) (:recycle :asdf/concatenate-source :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade (:use :uiop/common-lisp :uiop :asdf/upgrade
:asdf/component :asdf/operation :asdf/component :asdf/operation
......
;;;; ------------------------------------------------------------------------- ;;;; -------------------------------------------------------------------------
;;;; Finding components ;;;; Finding components
(asdf/package:define-package :asdf/find-component (uiop/package:define-package :asdf/find-component
(:recycle :asdf/find-component :asdf) (:recycle :asdf/find-component :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade (:use :uiop/common-lisp :uiop :asdf/upgrade
:asdf/component :asdf/system :asdf/find-system) :asdf/component :asdf/system :asdf/find-system)
......
;;;; ------------------------------------------------------------------------- ;;;; -------------------------------------------------------------------------
;;;; Finding systems ;;;; Finding systems
(asdf/package:define-package :asdf/find-system (uiop/package:define-package :asdf/find-system
(:recycle :asdf/find-system :asdf) (:recycle :asdf/find-system :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade (:use :uiop/common-lisp :uiop :asdf/upgrade
:asdf/component :asdf/system :asdf/cache) :asdf/component :asdf/system :asdf/cache)
......
;;;; ----------------------------------------------------------------------- ;;;; -----------------------------------------------------------------------
;;;; ASDF Footer: last words and cleanup ;;;; ASDF Footer: last words and cleanup
(asdf/package:define-package :asdf/footer (uiop/package:define-package :asdf/footer
(:recycle :asdf/footer :asdf) (:recycle :asdf/footer :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/operate :asdf/bundle)) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/operate :asdf/bundle))
(in-package :asdf/footer) (in-package :asdf/footer)
......
;;;; --------------------------------------------------------------------------- ;;;; ---------------------------------------------------------------------------
;;;; Handle ASDF package upgrade, including implementation-dependent magic. ;;;; Handle ASDF package upgrade, including implementation-dependent magic.
(asdf/package:define-package :asdf/interface (uiop/package:define-package :asdf/interface
(:nicknames :asdf :asdf-utilities) (:nicknames :asdf :asdf-utilities)
(:recycle :asdf/interface :asdf) (:recycle :asdf/interface :asdf)
(:unintern (:unintern
......
;;;; ------------------------------------------------------------------------- ;;;; -------------------------------------------------------------------------
;;;; Actions to build Common Lisp software ;;;; 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) (:recycle :asdf/lisp-action :asdf)
(:intern #:proclamations #:flags) (:intern #:proclamations #:flags)
(:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/cache (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/cache
...@@ -39,13 +39,12 @@ ...@@ -39,13 +39,12 @@
(with-upgradability () (with-upgradability ()
(defclass prepare-op (upward-operation sideway-operation) (defclass prepare-op (upward-operation sideway-operation)
((sideway-operation :initform 'load-op :allocation :class))) ((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, ;; 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. ;; 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))) ((selfward-operation :initform '(prepare-op compile-op) :allocation :class)))
(defclass compile-op (basic-compile-op downward-operation selfward-operation) (defclass compile-op (basic-compile-op downward-operation selfward-operation)
((selfward-operation :initform 'prepare-op :allocation :class) ((selfward-operation :initform 'prepare-op :allocation :class)))
(downward-operation :initform 'load-op :allocation :class)))
(defclass prepare-source-op (upward-operation sideway-operation) (defclass prepare-source-op (upward-operation sideway-operation)
((sideway-operation :initform 'load-source-op :allocation :class))) ((sideway-operation :initform 'load-source-op :allocation :class)))
...@@ -66,9 +65,6 @@ ...@@ -66,9 +65,6 @@
(defmethod perform ((o prepare-op) (c component)) (defmethod perform ((o prepare-op) (c component))
(declare (ignorable o c)) (declare (ignorable o c))
nil) nil)
(defmethod input-files ((o prepare-op) (c component))
(declare (ignorable o c))
nil)
(defmethod input-files ((o prepare-op) (s system)) (defmethod input-files ((o prepare-op) (s system))
(declare (ignorable o)) (declare (ignorable o))
(if-let (it (system-source-file s)) (list it)))) (if-let (it (system-source-file s)) (list it))))
......
;;;; ------------------------------------------------------------------------- ;;;; -------------------------------------------------------------------------
;;;; Invoking Operations ;;;; Invoking Operations
(asdf/package:define-package :asdf/operate (uiop/package:define-package :asdf/operate
(:recycle :asdf/operate :asdf) (:recycle :asdf/operate :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade (:use :uiop/common-lisp :uiop :asdf/upgrade
:asdf/component :asdf/system :asdf/operation :asdf/action :asdf/component :asdf/system :asdf/operation :asdf/action
......
;;;; ------------------------------------------------------------------------- ;;;; -------------------------------------------------------------------------
;;;; Operations ;;;; 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. (:recycle :asdf/operation :asdf/action :asdf) ;; asdf/action for FEATURE pre 2.31.5.
(:use :uiop/common-lisp :uiop :asdf/upgrade) (:use :uiop/common-lisp :uiop :asdf/upgrade)
(:export (:export
......
;;;; --------------------------------------------------------------------------- ;;;; ---------------------------------------------------------------------------
;;;; asdf-output-translations ;;;; asdf-output-translations
(asdf/package:define-package :asdf/output-translations (uiop/package:define-package :asdf/output-translations
(:recycle :asdf/output-translations :asdf) (:recycle :asdf/output-translations :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade) (:use :uiop/common-lisp :uiop :asdf/upgrade)
(:export (:export
......
;;;; ------------------------------------------------------------------------- ;;;; -------------------------------------------------------------------------
;;;; Defsystem ;;;; Defsystem
(asdf/package:define-package :asdf/parse-defsystem (uiop/package:define-package :asdf/parse-defsystem
(:recycle :asdf/parse-defsystem :asdf/defsystem :asdf) (:recycle :asdf/parse-defsystem :asdf/defsystem :asdf)
(:nicknames :asdf/defsystem) ;; previous name, to be compatible with, in case anyone cares (:nicknames :asdf/defsystem) ;; previous name, to be compatible with, in case anyone cares
(:use :uiop/common-lisp :asdf/driver :asdf/upgrade (:use :uiop/common-lisp :asdf/driver :asdf/upgrade
......
;;;; ------------------------------------------------------------------------- ;;;; -------------------------------------------------------------------------
;;;; Plan ;;;; Plan
(asdf/package:define-package :asdf/plan (uiop/package:define-package :asdf/plan
(:recycle :asdf/plan :asdf) (:recycle :asdf/plan :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade (:use :uiop/common-lisp :uiop :asdf/upgrade
:asdf/component :asdf/operation :asdf/system :asdf/component :asdf/operation :asdf/system
...@@ -198,8 +198,21 @@ the action of OPERATION on COMPONENT in the PLAN")) ...@@ -198,8 +198,21 @@ the action of OPERATION on COMPONENT in the PLAN"))
stamp) stamp)
(defmethod compute-action-stamp (plan (o operation) (c component) &key just-done) (defmethod compute-action-stamp (plan (o operation) (c component) &key just-done)
;; In a distant future, get-file-stamp and component-operation-time ;; Given an action, figure out at what time in the past it has been done,
;; shall also be parametrized by the plan, or by a second model object. ;; 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) (let* ((stamp-lookup #'(lambda (o c)
(if-let (it (plan-action-status plan o c)) (action-stamp it) t))) (if-let (it (plan-action-status plan o c)) (action-stamp it) t)))
(out-files (output-files o c)) (out-files (output-files o c))
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
;;;; Source Registry Configuration, by Francois-Rene Rideau ;;;; Source Registry Configuration, by Francois-Rene Rideau
;;;; See the Manual and https://bugs.launchpad.net/asdf/+bug/485918 ;;;; 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) (:recycle :asdf/source-registry :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/find-system) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/find-system)
(:export (:export
......
;;;; ------------------------------------------------------------------------- ;;;; -------------------------------------------------------------------------
;;;; Systems ;;;; Systems
(asdf/package:define-package :asdf/system (uiop/package:define-package :asdf/system
(:recycle :asdf :asdf/system) (:recycle :asdf :asdf/system)
(:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component) (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component)
(:export (:export
......
...@@ -393,8 +393,6 @@ valid_upgrade_test_p () { ...@@ -393,8 +393,6 @@ valid_upgrade_test_p () {
# It's damn slow. Also, for some reason, we punt on anything earlier than 2.25, # 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. # 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]:*) : ;; 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 fasl numbering broke loading of old asdf 2.0
ccl:2.0[01]*) : ;; ccl:2.0[01]*) : ;;
# My old ubuntu 10.04LTS clisp 2.44.1 came wired in # My old ubuntu 10.04LTS clisp 2.44.1 came wired in
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
;;;; Handle upgrade as forward- and backward-compatibly as possible ;;;; Handle upgrade as forward- and backward-compatibly as possible
;; See https://bugs.launchpad.net/asdf/+bug/485687 ;; See https://bugs.launchpad.net/asdf/+bug/485687
(asdf/package:define-package :asdf/upgrade (uiop/package:define-package :asdf/upgrade
(:recycle :asdf/upgrade :asdf) (:recycle :asdf/upgrade :asdf)
(:use :uiop/common-lisp :uiop) (:use :uiop/common-lisp :uiop)
(:export (:export
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#:*post-upgrade-cleanup-hook* #:*post-upgrade-restart-hook* #:cleanup-upgraded-asdf #:*post-upgrade-cleanup-hook* #:*post-upgrade-restart-hook* #:cleanup-upgraded-asdf
;; There will be no symbol left behind! ;; There will be no symbol left behind!
#:intern*) #:intern*)
(:import-from :asdf/package #:intern* #:find-symbol*)) (:import-from :uiop/package #:intern* #:find-symbol*))
(in-package :asdf/upgrade) (in-package :asdf/upgrade)
;;; Special magic to detect if this is an upgrade ;;; Special magic to detect if this is an upgrade
......
;;;; --------------------------------------------------------------------------- ;;;; ---------------------------------------------------------------------------
;;;; ASDF-USER, where the action happens. ;;;; ASDF-USER, where the action happens.
(asdf/package:define-package :asdf/user (uiop/package:define-package :asdf/user
(:nicknames :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))
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