From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christian Ohler Newsgroups: gmane.emacs.bugs Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Date: Sun, 20 May 2012 20:03:13 -0700 Message-ID: <4FB9B071.1060907@gnu.org> References: <4F8DE112.5010106@gnu.org> <4F90D369.7070005@gnu.org> <4F91CEEF.20305@gnu.org> <4FA6C6B3.7010403@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1337569422 31303 80.91.229.3 (21 May 2012 03:03:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 May 2012 03:03:42 +0000 (UTC) Cc: 11218@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 21 05:03:41 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SWIuD-0007i8-Aj for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 May 2012 05:03:33 +0200 Original-Received: from localhost ([::1]:34396 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWIuC-00044m-ML for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 May 2012 23:03:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWIu9-00044d-5v for bug-gnu-emacs@gnu.org; Sun, 20 May 2012 23:03:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWIu7-0006Ym-EM for bug-gnu-emacs@gnu.org; Sun, 20 May 2012 23:03:28 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWIu7-0006Ye-Ac for bug-gnu-emacs@gnu.org; Sun, 20 May 2012 23:03:27 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SWIug-0007Lu-8N for bug-gnu-emacs@gnu.org; Sun, 20 May 2012 23:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Christian Ohler Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 May 2012 03:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11218-submit@debbugs.gnu.org id=B11218.133756943328247 (code B ref 11218); Mon, 21 May 2012 03:04:02 +0000 Original-Received: (at 11218) by debbugs.gnu.org; 21 May 2012 03:03:53 +0000 Original-Received: from localhost ([127.0.0.1]:35998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SWIuW-0007LY-Vc for submit@debbugs.gnu.org; Sun, 20 May 2012 23:03:53 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:53276 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SWIuU-0007LR-TK for 11218@debbugs.gnu.org; Sun, 20 May 2012 23:03:51 -0400 Original-Received: from [204.14.153.109] (port=44607 helo=kamel.local) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1SWItt-0005cV-Ob; Sun, 20 May 2012 23:03:13 -0400 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:60248 Archived-At: Stefan Monnier, 2012-05-06: >> Collecting additional information about why the test failed is useful >> to virtually everyone who bothers running the test; there should be no >> reason not to. > > I disagree here. I think it's just as well if the "check" and the > "debug" are done in 2 different steps. ERT originally worked like you describe, until I got tired of having to re-run each failed test just to get a backtrace. The computer has the information in memory at the time the test fails; it should store it somewhere for me to look at later, rather than making me wait while it tries to recompute it. The backtrace is so basic that I practically always want to see it. In batch mode, ERT also has to collect the backtrace on every failure; the idea of re-running with debugging enabled makes no sense in that context (if enabling debugging to collect backtraces in batch mode was an optional flag to be set on a second run after noticing failures on the first run, why not set that flag the first time around?). Also, a continuous build system is much more useful if errors come with more information since that increases the chances that the bug can be fixed without first building a specific version on a specific architecture to reproduce it. >> The proper solution is to decouple the behaviors, perhaps by splitting >> the variable, perhaps by some other means. > > No, the proper solution is to make with-demoted-error (when run with > debug-on-error) continue execution (after hitting `c' in the debugger) > as if debug-on-error were nil. That sounds like a good idea; I would add that it should be possible to invoke this "restart" (in CL terms) programmatically. (This does decouple the behaviors: it allows errors to be demoted regardless of the setting of `debug-on-error'.) Christian.