1.0.42.24: print symbols with fully qualified names in critical places
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 2 Sep 2010 08:14:31 +0000 (08:14 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 2 Sep 2010 08:14:31 +0000 (08:14 +0000)
 Patch by Attila Lendvai, lp#622789.

 Less room for package confusion this way.

NEWS
src/code/class.lisp
src/code/condition.lisp
src/code/defmacro.lisp
src/code/defstruct.lisp
src/compiler/early-c.lisp
src/pcl/cpl.lisp
src/pcl/macros.lisp
src/pcl/std-class.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 0758334..c802acd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,9 @@ changes relative to sbcl-1.0.42
     &co.
   * enhancement: ASDF has been updated to version 2.004. (lp#605260, thanks to
     Faré Rideau)
+  * enhancement: symbols are printed using fully qualified names in several
+    error and warning messages which are often associated with package
+    conflicts or mixups (lp#622789, thanks to Attila Lendvai)
   * bug fix: SB-BSD-SOCKETS:SOCKET-CONNECT was not thread safe. (lp#505497,
     thanks to Andrew Golding)
   * bug fix: DOTIMES accepted literal non-integer reals. (lp#619393, thanks to
index 4e2d8fc..0db908d 100644 (file)
             (:primitive
              (error "Cannot redefine standard type ~S." name))
             (:defined
-             (warn "Redefining DEFTYPE type to be a class: ~S" name)
+             (warn "redefining DEFTYPE type to be a class: ~
+                    ~/sb-impl::print-symbol-with-prefix/" name)
                 (setf (info :type :expander name) nil
                       (info :type :lambda-list name) nil
                       (info :type :source-location name) nil)))
index 1ba4f0b..dbd3bfc 100644 (file)
   (:report
    (lambda (condition stream)
      (format stream
-             "The function ~S is undefined."
+             "The function ~/sb-impl::print-symbol-with-prefix/ is undefined."
              (cell-error-name condition)))))
 
 (define-condition special-form-function (undefined-function) ()
@@ -1353,14 +1353,16 @@ handled by any other handler, it will be muffled.")
    (new-location :initarg :new-location
               :reader redefinition-with-defun-new-location))
   (:report (lambda (warning stream)
-             (format stream "redefining ~S in DEFUN"
+             (format stream "redefining ~/sb-impl::print-symbol-with-prefix/ ~
+                             in DEFUN"
                      (function-redefinition-warning-name warning)))))
 
 (define-condition redefinition-with-defgeneric (function-redefinition-warning)
   ((new-location :initarg :new-location
                  :reader redefinition-with-defgeneric-new-location))
   (:report (lambda (warning stream)
-             (format stream "redefining ~S in DEFGENERIC"
+             (format stream "redefining ~/sb-impl::print-symbol-with-prefix/ ~
+                             in DEFGENERIC"
                      (function-redefinition-warning-name warning)))))
 
 (define-condition redefinition-with-defmethod (redefinition-warning)
index 39ec97c..c43a723 100644 (file)
@@ -89,7 +89,8 @@
                     ;; being incompatibly redefined. Doing this right
                     ;; will involve finding the old macro lambda-list
                     ;; and comparing it with the new one.
-                    (style-warn "redefining ~S in DEFMACRO" name))
+                    (style-warn "redefining ~/sb-impl::print-symbol-with-prefix/ ~
+                                 in DEFMACRO" name))
             (setf (sb!xc:macro-function name) definition)
             ,(when set-p
                    `(setf (%fun-doc definition) doc
index 76f3c83..3d3e32c 100644 (file)
       ;;x#-sb-xc-host
       ;;x(when (and (fboundp accessor-name)
       ;;x           (not (accessor-inherited-data accessor-name defstruct)))
-      ;;x  (style-warn "redefining ~S in DEFSTRUCT" accessor-name)))
+      ;;x  (style-warn "redefining ~/sb-impl::print-symbol-with-prefix/ ~
+      ;;                in DEFSTRUCT" accessor-name)))
       ;; which was done until sbcl-0.8.11.18 or so, is wrong: it causes
       ;; a warning at MACROEXPAND time, when instead the warning should
       ;; occur not just because the code was constructed, but because it
index 21f89b5..bb883b4 100644 (file)
@@ -186,7 +186,8 @@ the stack without triggering overflow protection.")
     ;; FIXME: should be COMPILER-STYLE-WARNING?
     (style-warn 'sb!kernel:asterisks-around-lexical-variable-name
                 :format-control
-                "using the lexical binding of the symbol ~S, not the~@
+                "using the lexical binding of the symbol ~
+                 ~/sb-impl::print-symbol-with-prefix/, not the~@
                  dynamic binding"
                 :format-arguments (list symbol)))
   (values))
index e1ac1aa..7bae6a2 100644 (file)
 (defun cpl-error (class format-string &rest format-args)
   (error "While computing the class precedence list of the class ~A.~%~A"
           (if (class-name class)
-              (format nil "named ~S" (class-name class))
+              (format nil "named ~/sb-impl::print-symbol-with-prefix/"
+                      (class-name class))
               class)
           (apply #'format nil format-string format-args)))
 
 (defun cpl-forward-referenced-class-error (class forward-class)
   (flet ((class-or-name (class)
            (if (class-name class)
-               (format nil "named ~S" (class-name class))
+               (format nil "named ~/sb-impl::print-symbol-with-prefix/"
+                       (class-name class))
                class)))
     (if (eq class forward-class)
         (cpl-error class
   (flet ((class-or-name (cpd)
            (let ((class (cpd-class cpd)))
              (if (class-name class)
-                 (format nil "named ~S" (class-name class))
+                 (format nil "named ~/sb-impl::print-symbol-with-prefix/"
+                         (class-name class))
                  class))))
     (mapcar
       (lambda (reason)
index 996e05f..80dab6b 100644 (file)
@@ -96,7 +96,8 @@
                   (ensure-non-standard-class symbol classoid))))))
       (cond ((null errorp) nil)
             ((legal-class-name-p symbol)
-             (error "There is no class named ~S." symbol))
+             (error "There is no class named ~
+                     ~/sb-impl::print-symbol-with-prefix/." symbol))
             (t
              (error "~S is not a legal class name." symbol)))))
 
index c7869ec..b1a60df 100644 (file)
               (style-warn
                "~@<slot names with the same SYMBOL-NAME but ~
                   different SYMBOL-PACKAGE (possible package problem) ~
-                  for class ~S:~4I~@:_~<~@{~S~^~:@_~}~:>~@:>"
+                  for class ~S:~4I~@:_~<~@{~/sb-impl::print-symbol-with-prefix/~^~:@_~}~:>~@:>"
                class dupes)))
         (let* ((slot (car slots))
                (oslots (remove (slot-definition-name slot) (cdr slots)
index f609b1b..eda5465 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.42.23"
+"1.0.42.24"