Commit 32dad5ee authored by Robert P. Goldman's avatar Robert P. Goldman
Browse files

Method for detecting code which needs to be patched for new OPERATIONs.

Added INITIALIZE-INSTANCE that checks for operations that have no
specified dependency propagations.
Also added NON-PROPAGATING-OPERATION as a way to specify that an
OPERATION subclass /intentionally/ performs no dependency propagation.
parent 989670e5
Loading
Loading
Loading
Loading
+24 −1
Original line number Diff line number Diff line
@@ -192,7 +192,30 @@ E.g. before a component may be loaded by LOAD-OP, it must have been compiled by
  (defmethod component-depends-on ((o selfward-operation) (c component))
    `(,@(loop :for op :in (ensure-list (selfward-operation o))
              :collect `(,op ,c))
      ,@(call-next-method))))
      ,@(call-next-method)))

  (defclass non-propagating-operation (operation)
    ()
    (:documentation "A NON-PROPAGATING-OPERATION is an operation that propagates 
no dependencies whatsoever.  It is supplied in order that the programmer be able
to specify that s/he is intentionally specifying an operation which invokes no
dependencies.")))


;;;---------------------------------------------------------------------------
;;; Help programmers catch obsolete OPERATION subclasses
;;;---------------------------------------------------------------------------
(defmethod initialize-instance :before ((obj operation) &key)
  (unless 
      (loop :for x :in '(downward-operation upward-operation sideway-operation
                                            selfward-operation non-propagating-operation)
            :when (typep obj x)
            :return t
            :finally (return nil))
    (error "No dependency propagating scheme specified for operation ~a.~
This is likely because the OPERATION subclass of this object has not been ~
updated for ASDF 3." obj)))
        


;;;; Inputs, Outputs, and invisible dependencies
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
   #:require-system #:test-system #:clear-system
   #:operation #:make-operation #:find-operation
   #:upward-operation #:downward-operation #:sideway-operation #:selfward-operation
                      #:non-propagating-operation
   #:build-system #:build-op
   #:load-op #:prepare-op #:compile-op
   #:prepare-source-op #:load-source-op #:test-op