From 6b4a914e9af95bb65d2ad5f7f13a72803eb6befc Mon Sep 17 00:00:00 2001
From: Francois-Rene Rideau <tunes@google.com>
Date: Mon, 21 Jan 2013 01:15:40 -0500
Subject: [PATCH] 2.26.133: more removal of debug statements and fixing of
 scripts

New script for deferred warnings.
---
 asdf.asd                              |  2 +-
 bundle.lisp                           |  7 ++-----
 header.lisp                           |  2 +-
 operation.lisp                        |  1 +
 plan.lisp                             |  2 --
 test/hello-world-example.asd          |  2 +-
 test/hello.lisp                       |  5 ++++-
 test/test-compile-file-failure.script |  1 -
 test/test-deferred-warnings.script    | 29 +++++++++++++++++++++++++++
 test/test-program.script              |  9 ++++++++-
 test/undefined-function.lisp          |  5 +++++
 upgrade.lisp                          |  2 +-
 version.lisp-expr                     |  2 +-
 13 files changed, 54 insertions(+), 15 deletions(-)
 create mode 100644 test/test-deferred-warnings.script
 create mode 100644 test/undefined-function.lisp

diff --git a/asdf.asd b/asdf.asd
index 46194a554..8c88e32cf 100644
--- a/asdf.asd
+++ b/asdf.asd
@@ -15,7 +15,7 @@
   :licence "MIT"
   :description "Another System Definition Facility"
   :long-description "ASDF builds Common Lisp software organized into defined systems."
-  :version "2.26.132" ;; to be automatically updated by make bump-version
+  :version "2.26.133" ;; to be automatically updated by make bump-version
   :depends-on ()
   :components ((:module "build" :components ((:file "asdf"))))
   :in-order-to (#+asdf2.27 (compile-op (monolithic-load-concatenated-source-op asdf/defsystem))))
diff --git a/bundle.lisp b/bundle.lisp
index b0af6ba58..cc3639b9a 100644
--- a/bundle.lisp
+++ b/bundle.lisp
@@ -20,14 +20,13 @@
    #:build-args #:name-suffix #:prologue-code #:epilogue-code #:static-library
    #:component-translate-output-p #:translate-output-p
    #:component-bundle-pathname #:bundle-pathname
-   #:component-bundle-operation #:bundle-operation
    #:component-entry-point #:entry-point))
 (in-package :asdf/bundle)
 
 (defclass bundle-op (operation)
   ((build-args :initarg :args :initform nil :accessor bundle-op-build-args)
    (name-suffix :initarg :name-suffix :initform nil)
-   (bundle-type :reader bundle-type)
+   (bundle-type :initform :no-output-file :reader bundle-type)
    #+ecl (lisp-files :initform nil :accessor bundle-op-lisp-files)
    #+mkcl (do-fasb :initarg :do-fasb :initform t :reader bundle-op-do-fasb-p)
    #+mkcl (do-static-library :initarg :do-static-library :initform t :reader bundle-op-do-static-library-p)))
@@ -97,8 +96,6 @@
 (defclass bundle-system (system)
   ((bundle-pathname
     :initform nil :initarg :bundle-pathname :accessor component-bundle-pathname)
-   (bundle-operation
-    :initarg :bundle-operation :accessor component-bundle-operation)
    (entry-point
     :initform nil :initarg :entry-point :accessor component-entry-point)
    (translate-output-p
@@ -264,7 +261,7 @@
 
 (defmethod component-depends-on :around ((o bundle-op) (c component))
   (declare (ignorable o c))
-  (if-let (op (and (eq (type-of o) 'bundle-op) (component-bundle-operation c)))
+  (if-let (op (and (eq (type-of o) 'bundle-op) (component-build-operation c)))
       `((,op ,c))
       (call-next-method)))
 
diff --git a/header.lisp b/header.lisp
index e9fb97d47..a65dad9d2 100644
--- a/header.lisp
+++ b/header.lisp
@@ -1,5 +1,5 @@
 ;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; coding: utf-8 -*-
-;;; This is ASDF 2.26.132: Another System Definition Facility.
+;;; This is ASDF 2.26.133: Another System Definition Facility.
 ;;;
 ;;; Feedback, bug reports, and patches are all welcome:
 ;;; please mail to <asdf-devel@common-lisp.net>.
diff --git a/operation.lisp b/operation.lisp
index 6331f780e..3fa4bfc02 100644
--- a/operation.lisp
+++ b/operation.lisp
@@ -8,6 +8,7 @@
    #:operation
    #:operation-original-initargs ;; backward-compatibility only. DO NOT USE.
    #:build-op ;; THE generic operation
+   #:*operations*
    #:make-operation
    #:find-operation))
 (in-package :asdf/operation)
diff --git a/plan.lisp b/plan.lisp
index 8192f2fb5..97116928a 100644
--- a/plan.lisp
+++ b/plan.lisp
@@ -196,8 +196,6 @@ the action of OPERATION on COMPONENT in the PLAN"))
        (latest-stamp-f stamp (funcall dependency-stamper dep-o dep-c)))))
   stamp)
 
-(asdf-debug)
-
 (defmethod compute-action-stamp (plan (o operation) (c component) &key just-done)
   ;; In a distant future, safe-file-write-date and component-operation-time
   ;; shall also be parametrized by the plan, or by a second model object.
diff --git a/test/hello-world-example.asd b/test/hello-world-example.asd
index b8e244ac7..1f88de1a0 100644
--- a/test/hello-world-example.asd
+++ b/test/hello-world-example.asd
@@ -3,7 +3,7 @@
 (defsystem :hello-world-example
   :class :bundle-system
   :build-operation program-op
-  :entry-point "hello:main"
+  :entry-point "hello:entry-point"
   :depends-on (:asdf-driver)
   :translate-output-p nil
   :components ((:file "hello")))
diff --git a/test/hello.lisp b/test/hello.lisp
index cec8eca84..5ffca84bf 100644
--- a/test/hello.lisp
+++ b/test/hello.lisp
@@ -1,6 +1,6 @@
 (defpackage :hello
   (:use :cl :asdf/driver)
-  (:export #:main))
+  (:export #:main #:entry-point))
 
 (in-package :hello)
 
@@ -8,3 +8,6 @@
   (format t "hello, world~%")
   (when arguments
     (format t "You passed ~D arguments:~%~{  ~S~%~}" (length arguments) arguments)))
+
+(defun entry-point ()
+  (apply 'main *command-line-arguments*))
diff --git a/test/test-compile-file-failure.script b/test/test-compile-file-failure.script
index cc741ee0f..bd612ca6a 100644
--- a/test/test-compile-file-failure.script
+++ b/test/test-compile-file-failure.script
@@ -14,4 +14,3 @@
               (load-system 'test-compile-file-failure :force t)
               nil)
           (compile-file-error () t)))
-
diff --git a/test/test-deferred-warnings.script b/test/test-deferred-warnings.script
new file mode 100644
index 000000000..3ee7f107d
--- /dev/null
+++ b/test/test-deferred-warnings.script
@@ -0,0 +1,29 @@
+;;; -*- Lisp -*-
+
+(clear-system :test-deferred-warnings)
+(def-test-system :test-deferred-warnings
+  :serial t
+  :components ((:file "undefined-function")
+               (:file "file1")))
+(assert
+ (handler-case
+     (let ((*compile-file-warnings-behaviour* :ignore))
+       (load-system :test-deferred-warnings :force t)
+       t)
+   (compile-file-error () nil)))
+
+#-ecl
+(assert
+ (handler-case
+     (let ((*compile-file-warnings-behaviour* :error))
+       (load-system :test-deferred-warnings :force t)
+       nil)
+   (compile-warned-error () t)))
+
+#+(or clozure sbcl)
+(assert
+ (handler-case
+     (let ((*compile-file-warnings-behaviour* :error))
+       (perform 'compile-op :test-deferred-warnings)
+       nil)
+   (compile-warned-error () t)))
diff --git a/test/test-program.script b/test/test-program.script
index 65b47f20d..cedc3ba95 100644
--- a/test/test-program.script
+++ b/test/test-program.script
@@ -33,5 +33,12 @@
               :load (native-namestring (subpathname *test-directory* "make-hello-world.lisp"))))
 (assert (probe-file* exe))
 
-(assert-equal (run-program/ (native-namestring exe) :output :lines)
+(assert-equal (run-program/ `(,(native-namestring exe)) :output :lines)
               '("hello, world"))
+
+(assert-equal (run-program/ `(,(native-namestring exe) "a" "b c" "d") :output :lines)
+              '("hello, world"
+                "You passed 3 arguments:"
+                "  \"a\""
+                "  \"b c\""
+                "  \"d\""))
diff --git a/test/undefined-function.lisp b/test/undefined-function.lisp
new file mode 100644
index 000000000..48915bd4d
--- /dev/null
+++ b/test/undefined-function.lisp
@@ -0,0 +1,5 @@
+
+(in-package :asdf)
+
+(defun using-some-undefined-function ()
+  (some-undefined-function))
diff --git a/upgrade.lisp b/upgrade.lisp
index d9e59188c..54d4aabfa 100644
--- a/upgrade.lisp
+++ b/upgrade.lisp
@@ -35,7 +35,7 @@
          ;; "2.345.6" would be a development version in the official upstream
          ;; "2.345.0.7" would be your seventh local modification of official release 2.345
          ;; "2.345.6.7" would be your seventh local modification of development version 2.345.6
-         (asdf-version "2.26.132")
+         (asdf-version "2.26.133")
          (existing-asdf (find-class (find-symbol* :component :asdf nil) nil))
          (existing-version *asdf-version*)
          (already-there (equal asdf-version existing-version))
diff --git a/version.lisp-expr b/version.lisp-expr
index b6155aa61..393b3afcb 100644
--- a/version.lisp-expr
+++ b/version.lisp-expr
@@ -1 +1 @@
-"2.26.132"
+"2.26.133"
-- 
GitLab