1.0.46.3: muffle STYLE-WARNINGs and COMPILER-NOTEs from --script loading
authorNikodemus Siivola <nikodemus@random-state.net>
Sun, 20 Feb 2011 10:23:16 +0000 (10:23 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Sun, 20 Feb 2011 10:23:16 +0000 (10:23 +0000)
 I have a hard time coming up with a case where either is
 desirable in a script, and they can be hard to avoid in
 some cases.

 Fixes lp#677779, and then some.

NEWS
src/code/toplevel.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 0cfc5f0..ed8aad6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
 ;;;; -*- coding: utf-8; fill-column: 78 -*-
 changes relative to sbcl-1.0.46:
+  * enhancement: --script muffles style-warnings and compiler notes. (lp#677779)
   * bug fix: SB-DEBUG:BACKTRACE-AS-LIST guards against potentially leaking
     stack-allocated values out of their dynamic-extent. (lp#310175)
   * bug fix: attempts to use SB-SPROF for wallclock profiling on threaded
index 0868844..f519002 100644 (file)
@@ -297,7 +297,10 @@ any non-negative real number."
     (handling-end-of-the-world
       (with-open-file (f pathname :element-type :default)
         (sb!fasl::maybe-skip-shebang-line f)
-        (load f :verbose nil :print nil)
+        ;; Scripts don't need to be stylish or fast, but silence is usually a
+        ;; desirable quality...
+        (handler-bind (((or style-warning compiler-note) #'muffle-warning))
+          (load f :verbose nil :print nil))
         (quit)))))
 
 ;; Errors while processing the command line cause the system to QUIT,
index b591435..46c146e 100644 (file)
@@ -20,4 +20,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.46.2"
+"1.0.46.3"