Skip to content
Snippets Groups Projects
Commit 4c85c717 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

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

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