Commit 89b15db3 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

1.711: make operate a gf, so POIU can hook on it instead of reimplementing it.

parent ef75676b
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@
        (remove "asdf" excl::*autoload-package-name-alist* :test 'equalp :key 'car))
  (let* ((asdf-version
          ;; the 1+ hair is to ensure that we don't do an inadvertent find and replace
          (subseq "VERSION:1.710" (1+ (length "VERSION"))))
          (subseq "VERSION:1.711" (1+ (length "VERSION"))))
         (existing-asdf (find-package :asdf))
         (versym '#:*asdf-version*)
         (existing-version (and existing-asdf
@@ -72,7 +72,7 @@
         (redefined-functions
          '(#:perform #:explain #:output-files #:operation-done-p
            #:perform-with-restarts #:component-relative-pathname
            #:system-source-file)))
            #:system-source-file #:operate)))
    (unless (equal asdf-version existing-version)
      (when existing-asdf
        (format *error-output*
@@ -1776,7 +1776,9 @@ recursive calls to traverse.")
;;;; -------------------------------------------------------------------------
;;;; Invoking Operations

(defun operate (operation-class system &rest args
(defgeneric operate (operation-class system &key &allow-other-keys))

(defmethod operate (operation-class system &rest args
                    &key ((:verbose *asdf-verbose*) *asdf-verbose*) version force
                    &allow-other-keys)
  (declare (ignore force))
@@ -1794,7 +1796,8 @@ recursive calls to traverse.")
        (loop :for (op . component) :in steps :do
          (loop
            (restart-case
                (progn (perform-with-restarts op component)
                (progn
                  (perform-with-restarts op component)
                  (return))
              (retry ()
                :report
+2 −4
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@

(quit-on-error
 (setf asdf:*central-registry* '(*default-pathname-defaults*))
 ;;(trace ASDF::MERGE-COMPONENT-RELATIVE-PATHNAME ASDF::COMPONENT-RELATIVE-PATHNAME)
 (asdf:operate 'asdf:load-op 'test1)
 ;; test that it compiled
 (let* ((file1 (asdf:compile-file-pathname* "file1"))
@@ -18,9 +17,7 @@
   ;; and loaded
   (assert (symbol-value (find-symbol (symbol-name :*file1*) :test-package)))

   ;; now remove one output file and check that the other is _not_
   ;; recompiled
   (sleep 1) ; mtime has 1-second granularity, so pause here for fast machines
   ;; now remove one output file and check that the other is _not_ recompiled

   ;;(trace asdf::operation-done-p asdf::traverse)
   (asdf::run-shell-command "rm -f ~A" (namestring file2))
@@ -34,6 +31,7 @@
   ;; unix cwd.  this is not a problem for run-tests.sh, but can be in general

   (let ((before (file-write-date file2)))
     ;; filesystem mtime has 1 second granularity. Make sure even fast machines see a difference.
     (sleep 1)
     (asdf::run-shell-command "touch file1.lisp")
     (asdf:operate 'asdf:load-op 'test1)