From 3969fabecc7837eff2c7a8f8f6dc1e0a127c80c8 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sun, 20 Feb 2011 10:23:16 +0000 Subject: [PATCH] 1.0.46.3: muffle STYLE-WARNINGs and COMPILER-NOTEs from --script loading 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 | 1 + src/code/toplevel.lisp | 5 ++++- version.lisp-expr | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 0cfc5f0..ed8aad6 100644 --- 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 diff --git a/src/code/toplevel.lisp b/src/code/toplevel.lisp index 0868844..f519002 100644 --- a/src/code/toplevel.lisp +++ b/src/code/toplevel.lisp @@ -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, diff --git a/version.lisp-expr b/version.lisp-expr index b591435..46c146e 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4