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
(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
......
;;;; -------------------------------------------------------------------------
;;; 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
......
;;;; -------------------------------------------------------------------------
;;; 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
......
;;;; -------------------------------------------------------------------------
;;;; 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
......
;;;; -------------------------------------------------------------------------
;;;; 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
......
;;;; -------------------------------------------------------------------------
;;;; 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
......
;;;; -------------------------------------------------------------------------
;;;; 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
......
;;;; -------------------------------------------------------------------------
;;;; 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)
......
;;;; -------------------------------------------------------------------------
;;;; 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)
......
;;;; -----------------------------------------------------------------------
;;;; 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)
......
;;;; ---------------------------------------------------------------------------
;;;; 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
......
;;;; -------------------------------------------------------------------------
;;;; 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))))
......
;;;; -------------------------------------------------------------------------
;;;; 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
......
;;;; -------------------------------------------------------------------------
;;;; 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
......
;;;; ---------------------------------------------------------------------------
;;;; 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
......
;;;; -------------------------------------------------------------------------
;;;; 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
......
;;;; -------------------------------------------------------------------------
;;;; 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))
......
......@@ -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
......
;;;; -------------------------------------------------------------------------
;;;; 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
......
......@@ -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
......
......@@ -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
......
;;;; ---------------------------------------------------------------------------
;;;; 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))
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