Commit 4c85c717 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Update some comments and docstrings, proofreading Robert's edits.

Remove some trailing spaces.
parent 5a6186cd
......@@ -119,8 +119,8 @@ You can put together sentences using this phrase."))
[Note: an <operation> is an operation designator -- it can be either an
operation name or an operation object. Similarly, a <component> may be
a component name or a component object. Finally, the degenerate case of
(<operation>) is treated as a no-op.]
a component name or a component object. Also note that, the degenerate
case of (<operation>) is a no-op.]
or
......@@ -199,9 +199,9 @@ then the action (O . C) of O on component C depends on each (S . C) for S in L.
E.g. before a component may be loaded by LOAD-OP, it must have been compiled by COMPILE-OP.
A operation-designator designates a singleton list of the designated operation;
a list of operation-designators designates the list of designated operations;
NIL is not a valid operation designator in that context. Note that orderings between
the operations in a list of SELWARD-OPERATION should be indicated separately in order
that they be scheduled properly."))
NIL is not a valid operation designator in that context. Note that any dependency
ordering between the operations in a list of SELFWARD-OPERATION should be specified separately
in the respective operation's COMPONENT-DEPENDS-ON methods so that they be scheduled properly."))
(defun selfward-operation-depends-on (o c)
(loop :for op :in (ensure-list (selfward-operation o)) :collect `(,op ,c)))
(defmethod component-depends-on ((o selfward-operation) (c component))
......@@ -405,11 +405,11 @@ in some previous image, or T if it needs to be done.")
;;; Generic build operation
(with-upgradability ()
;; build op was intended to be the master, default operation on a system
;; (LOAD-OP typically serves that function now). This feature has not yet
;; been fully implemented yet.
;; This is a path forward, but is not backwardly compatible, and is not used
;; yet. [2014/01/26:rpg]
;; BUILD-OP was intended to be the default "master" operation to invoke on a system in ASDF3
;; (LOAD-OP typically serves that function now).
;; This feature has not yet been fully implemented yet, and is not used by anyone yet.
;; This is a path forward, and its default below is to backward compatibly depend on LOAD-OP.
;; [2014/01/26:rpg]
(defclass build-op (non-propagating-operation) ())
(defmethod component-depends-on ((o build-op) (c component))
`((,(or (component-build-operation c) 'load-op) ,c))))
......
......@@ -138,8 +138,7 @@ another pathname in a degenerate way."))
(defun component-find-path (component)
"Return a path from a root system to the COMPONENT.
The return value is a list of component NAMES; a list of
strings."
The return value is a list of component NAMES; a list of strings."
(check-type component (or null component))
(reverse
(loop :for c = component :then (component-parent c)
......
......@@ -39,8 +39,7 @@
(with-upgradability ()
(defclass prepare-op (upward-operation sideway-operation)
((sideway-operation :initform 'load-op :allocation :class))
(:documentation "Load the necessary dependencies for the COMPONENT to which we apply
the PREPARE-OP."))
(:documentation "Load dependencies necessary for COMPILE-OP or LOAD-OP of a given COMPONENT."))
(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.
......
......@@ -57,5 +57,3 @@
(declare (ignorable context))
nil))
......@@ -322,17 +322,18 @@ the action of OPERATION on COMPONENT in the PLAN"))
(defmethod traverse-action (plan operation component needed-in-image-p)
(block nil
;; ACTION-VALID-P among other things, handles forcing logic, including
;; FORCE-NOT.
;; ACTION-VALID-P among other things, handles forcing logic, including FORCE-NOT,
;; and IF-FEATURE filtering.
(unless (action-valid-p plan operation component) (return nil))
;; the following is needed by POIU, which tracks a dependency graph,
;; the following hook is needed by POIU, which tracks a full dependency graph,
;; instead of just a dependency order as in vanilla ASDF
(plan-record-dependency plan operation component)
;; needed in image distinguishes b/w things that must happen in the
;; current image and those things that simply need to have been done.
(let* ((aniip (needed-in-image-p operation component))
;; effectively needed in image
;; current image and those things that simply need to have been done in a previous one.
(let* ((aniip (needed-in-image-p operation component)) ; action-specific needed-in-image
;; effective niip: meaningful for the action and required by the plan as traversed
(eniip (and aniip needed-in-image-p))
;; status: have we traversed that action previously, and if so what was its status?
(status (plan-action-status plan operation component)))
(when (and status (or (action-done-p status) (action-planned-p status) (not eniip)))
(return (action-stamp status))) ; Already visited with sufficient need-in-image level!
......
......@@ -50,7 +50,7 @@
(:file "does-not-exist"
:in-order-to ((compile-op (feature (:not :common-lisp))))))
:if-component-dep-fails :ignore)))))
(defsystem :test-asdf/test9-2
:version "1.0"
......
......@@ -51,7 +51,7 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO
(defun upgrading-p ()
(and *previous-asdf-versions* (not (equal *asdf-version* (first *previous-asdf-versions*)))))
(defmacro when-upgrading ((&key (upgrading-p '(upgrading-p)) when) &body body)
"A wrapper macro for code that should only be run when upgrading a
"A wrapper macro for code that should only be run when upgrading a
previously-loaded version of ASDF."
`(with-upgradability ()
(when (and ,upgrading-p ,@(when when `(,when)))
......
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