Commit 0ae958c4 authored by Robert P. Goldman's avatar Robert P. Goldman Committed by Francois-Rene Rideau
Browse files

There was code here that caused a style warning because it was checking


for the return of safe-file-write-date being NIL, which it could never
be.  This indicated odd treatment of missing file write dates in
operation-done-p.  I have revised this.

Signed-off-by: default avatarFrancois-Rene Rideau <fare@tunes.org>
parent 200eb7f6
Loading
Loading
Loading
Loading
+25 −30
Original line number Diff line number Diff line
@@ -880,7 +880,11 @@ to `~a` which is not a directory.~@:>"
           ;; that's the case, well, that's not good, but as long as
           ;; the operation is otherwise considered to be done we
           ;; could continue and survive.
  (or (file-write-date pathname) 0))
  (or (file-write-date pathname)
      (progn
        (warn "Missing FILE-WRITE-DATE for ~S: treating it as zero."
              pathname)
        0)))

(defun find-system (name &optional (error-p t))
  (let* ((name (coerce-name name))
@@ -1073,15 +1077,6 @@ to `~a` which is not a directory.~@:>"
(defmethod input-files ((operation operation) (c module)) nil)

(defmethod operation-done-p ((o operation) (c component))
  (flet ((fwd-or-return-t (file)
           (let ((date (safe-file-write-date file)))
             (cond
               (date)
               (t
                (warn "~@<Missing FILE-WRITE-DATE for ~S: treating ~
                       operation ~S on component ~S as done.~@:>"
                      file o c)
                (return-from operation-done-p t))))))
  (let ((out-files (output-files o c))
        (in-files (input-files o c)))
    (cond ((and (not in-files) (not out-files))
@@ -1095,13 +1090,13 @@ to `~a` which is not a directory.~@:>"
             (and op-done
                  (>= op-done
                      (apply #'max
                               (mapcar #'fwd-or-return-t in-files))))))
                             (mapcar #'safe-file-write-date in-files))))))
          ((not in-files) nil)
          (t
           (and
            (every #'probe-file out-files)
            (> (apply #'min (mapcar #'safe-file-write-date out-files))
                 (apply #'max (mapcar #'fwd-or-return-t in-files)))))))))
               (apply #'max (mapcar #'safe-file-write-date in-files))))))))

;;; So you look at this code and think "why isn't it a bunch of
;;; methods".  And the answer is, because standard method combination