From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] emacs-25 db436e9: Don't call debug on failed cl-assert Date: Sun, 6 Nov 2016 13:28:46 -0500 Message-ID: References: <20161105015720.6371.89806@vcs.savannah.gnu.org> <20161105015720.88A6322012D@vcs.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1478457629 996 195.159.176.226 (6 Nov 2016 18:40:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 6 Nov 2016 18:40:29 +0000 (UTC) Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 06 19:40:25 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3SMW-0006gX-4n for ged-emacs-devel@m.gmane.org; Sun, 06 Nov 2016 19:40:12 +0100 Original-Received: from localhost ([::1]:46196 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3SMZ-0007AO-1Q for ged-emacs-devel@m.gmane.org; Sun, 06 Nov 2016 13:40:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3SBV-0004W6-9u for emacs-devel@gnu.org; Sun, 06 Nov 2016 13:28:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3SBU-0003bw-86 for emacs-devel@gnu.org; Sun, 06 Nov 2016 13:28:49 -0500 Original-Received: from mail-it0-x22a.google.com ([2607:f8b0:4001:c0b::22a]:36347) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c3SBU-0003bK-3X for emacs-devel@gnu.org; Sun, 06 Nov 2016 13:28:48 -0500 Original-Received: by mail-it0-x22a.google.com with SMTP id m138so57266816itm.1 for ; Sun, 06 Nov 2016 10:28:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=EEaPuzU/UBre0YXCuBW93n8CXMEqQ64Z8+6lpqpTLLI=; b=tUhN+EW6qOYPKAaW+DU7LjKOgju8fRSzJtkda2KCb99tituXnmKvJJyOatE7P+UJ8t wQZdpy8HvIcYxiY5SCGoE2lMwDHuURO5fWy6Jx2aF7Y0ypzBysDExYUIbZBHbGAcWvz4 yFZPTy2KMiCFUqPL1VkzMfTA7bdskSQjVPBsgdMqnVP/XIYbjrYzfJGBL5Xb9k2FHmZw I26DDwYQcgbvlQ9Emcu23mfjgahC+sQm9wOzEL3uylz5ME7OJeVdohSyT+kcloG1ftOd T+Jo/ehp7YmLsUeFj8OZ4HZtMUql/AfI1Y6edupqL50ViYh+40qzzAyOBEnei83s2rx7 Z/Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=EEaPuzU/UBre0YXCuBW93n8CXMEqQ64Z8+6lpqpTLLI=; b=hiR2A1RrwUN1TA2LPrQZjdqKM7P436cEPF037KDHqqv8UAaCffdLpRdMebxToiFPao 2wDXvVbfZGf8NbqwLhfuz/RHy8hzDvckwjrC6zqt3PIpJCFUw7pJhp/2ueLMP/3xnKUB Z/0RJnaDrPyWYPVHiRNf7hK/11Z+9lBrbFmLMqz6e64TeYdN+MbGZ1gyO1wuD9R/txgU QeWsUarSpD1UHJESeGbWlD9WJwYffj/FbmK7g+fEmBhK+T47zH5BcmuyeiW6aFtyTKcQ FmwX05hp9QVliogBl4JgaaiGL0nprA7ywfBthSENwbNGh/ZIwp+it9HU25OkeWiRfAqX Extw== X-Gm-Message-State: ABUngvcY0diZJpEE2TdlqyGlKJ84QaykhPE4TevJ1wuls0tYQL0BdnSMj30nn0ruU8lCOQgiffi2zDfDETomWg== X-Received: by 10.202.204.66 with SMTP id c63mr2389035oig.4.1478456927066; Sun, 06 Nov 2016 10:28:47 -0800 (PST) Original-Received: by 10.157.4.86 with HTTP; Sun, 6 Nov 2016 10:28:46 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c0b::22a X-Mailman-Approved-At: Sun, 06 Nov 2016 13:40:09 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:209220 Archived-At: On Sat, Nov 5, 2016 at 1:22 PM, Stefan Monnier wrote: > > > Don't call debug on failed cl-assert > > That's really too bad: I introduced it very explicitly because I found > it extremely convenient. Oh, I see; it would be helpful if you had included the rational in the commit message where you introduced it. > > > Doing this causes problems when running ert tests > > Can it be fixed somewhere else? I don't quite understand what's the benefit of calling debug when debug-on-error is non-nil: signalling the error is going to call it anyway. But it looks like funcalling `debugger' instead of calling `debug' seems to work: (defun cl--assertion-failed (form &optional string sargs args) (if debug-on-error (funcall debugger `(cl-assertion-failed ,form ,string ,@sargs)) (if string (apply #'error string (append sargs args)) (signal 'cl-assertion-failed `(,form ,@sargs)))))