From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#24402: should-error doesn't catch all errors Date: Wed, 12 Jul 2017 23:44:19 -0400 Message-ID: <87d195dmr0.fsf@users.sourceforge.net> References: <3654D8E9-D3CB-402B-922F-B132C1871E9F@runbox.com> <596E65D2-E780-43A1-A75B-603B61B6F9F4@runbox.com> <87zickhoco.fsf_-_@lylat> <877eznda7v.fsf@lylat> <874lur0zki.fsf@calancha-pc> <87o9sywtbz.fsf@lylat> <87fue3f9p8.fsf@users.sourceforge.net> <87vamyl3j3.fsf@lylat> <87tw2het1b.fsf@users.sourceforge.net> <874luhbo4l.fsf@lylat> <87lgntdswo.fsf@users.sourceforge.net> <87k23d9gvt.fsf@lylat> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1499917397 20354 195.159.176.226 (13 Jul 2017 03:43:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Jul 2017 03:43:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) Cc: Gemini Lasswell , 24402@debbugs.gnu.org, Tino Calancha To: Alex Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 13 05:43:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1dVV20-0004mW-FS for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jul 2017 05:43:12 +0200 Original-Received: from localhost ([::1]:57042 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVV20-00040M-Ne for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jul 2017 23:43:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVV1u-00040C-L1 for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 23:43:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVV1q-0002Ep-N7 for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 23:43:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33387) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVV1q-0002Eb-IS for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 23:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dVV1q-00016s-Au for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 23:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jul 2017 03:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24402 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed patch Original-Received: via spool by 24402-submit@debbugs.gnu.org id=B24402.14999173754251 (code B ref 24402); Thu, 13 Jul 2017 03:43:02 +0000 Original-Received: (at 24402) by debbugs.gnu.org; 13 Jul 2017 03:42:55 +0000 Original-Received: from localhost ([127.0.0.1]:36064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVV1j-00016U-6n for submit@debbugs.gnu.org; Wed, 12 Jul 2017 23:42:55 -0400 Original-Received: from mail-it0-f46.google.com ([209.85.214.46]:36081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVV1h-00016I-26 for 24402@debbugs.gnu.org; Wed, 12 Jul 2017 23:42:53 -0400 Original-Received: by mail-it0-f46.google.com with SMTP id m68so27935648ith.1 for <24402@debbugs.gnu.org>; Wed, 12 Jul 2017 20:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=l+XiAXUlRw+hHJUs2bw3MLgyC1zTphz2R4pm9d7RqzE=; b=lkwgRv4Zmu8axDIdfg/LFB4Q62vObCvQzUrIKnrlDyxy1pt0VR9CpNAbEDffkOAO+i E/8Swg6ORVIffM6zVRradfte/pUeNg73kGZzdtRA4vXMIffGa5tNDL+1MOl8II5iM50P UoMU+n6SHZmtgjqvDpNcNb2dX6f033c6xjZtDUnsafaytqabJRsD6INi01ivGhObhTpa Arpy8zAeikaKmP1PmZGPyBVrBXjLv4jqWRji3IOUZUCVJQQ+cVtGQEPEHotIXkgMMPRe 52bqKjB3XUkRIpzVezcSJNG815xcCi+t/NatmcgN1Y4+nEd8K1QvnSIxd9Is2HLrnKoO rExg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=l+XiAXUlRw+hHJUs2bw3MLgyC1zTphz2R4pm9d7RqzE=; b=e/ZwGnyyYr05YA0x5B5fhQmahKnkvYbA0yKNwg12Z9+6R+4k4Li/T+xS808ts9vFP+ JKg0ArN+18wJLsx5R8/YJNNl2D6KcM+fEuY3p2xU3T06hEaAu+We3Tfh+ZFP2j4ITTAb nK1KgnTK3VXmBfj8HHn1AelB3WLYd1ciRydj0ygzzdb+eqqye1OdtI0hh5HaHWN5Xm5j LYdo95dS7/aYS6r+lRVbxvr2UeKRDYoe/amJ04CYvxEmopIaxYvKHBvzyHtFW49iym4E LYtx55a8UhUi13LgEE0i07V6lgBIqLsfCBFM+MIl3r9Cot3XstpY0xjVTeePXAxgM2yG DgQw== X-Gm-Message-State: AIVw110yuwJHAx9PZyqCZHoTrTDLV8fA70XkHJXZTFR+Lg4jRZ9U5h2b x7Ga1JEOcF605A== X-Received: by 10.107.173.15 with SMTP id w15mr1537795ioe.99.1499917367412; Wed, 12 Jul 2017 20:42:47 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id v65sm2415961iod.28.2017.07.12.20.42.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Jul 2017 20:42:46 -0700 (PDT) In-Reply-To: <87k23d9gvt.fsf@lylat> (Alex's message of "Wed, 12 Jul 2017 21:04:38 -0600") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:134495 Archived-At: Alex writes: >>> I get 3 test failures with TEST_LOAD_EL=3Dno, but I don't believe they'= re >>> because of me. On a mostly clean master (d014a5e15) those 3 also error. >>> One of them is simple to fix (the (require 'subr-x) should not be inside >>> eval-when-compile in dom-tests). >> >> Ah, the `should' blocks inlining during compilation. Is that necessary? >> Probably yes if we expect to catch errors during macroexpansion I guess. > > Can you get errors by expanding inlined functions? Yes I think so, probably not from defsubst (except for wrong number of arguments maybe?), but I believe define-inline basically lets you run an arbitrary macro to produce the inlined call. > Macros are expanded at compile-time with the current patch. If there are > any macroexpansion errors, then the form is altered to be (error > ). Perhaps inline functions could work similarly. > > Here's a diff to my patch that uses byte-compile-inline-expand. This > fixes the dom-tests case. Do you think it's worth it? It would be nice if we can make code inside tests behave the same as outside. But we should make it conditional on whether the code is being compiled, otherwise code inside tests would behave differently when being interpreted. Anyway, we can leave this for a separate bug. > Yes, that's why there's the second test that checks for error-symbol to > be ert-test-{failed, skipped}. Basically what's happening is that > ert--signal-hook forces the debugger to trigger even inside a > condition-case, but only with a non-symbol `debugger' (since > ert--run-test-internal binds it to a closure), and one of the above two > errors. > > The only time this approach fails is when you bind `debugger' to a > non-symbol and also signal ert-test-{failed, skipped}. Okay, it sounds like we would only hit problems when running an ert test from inside an ert test. That should be pretty rare outside of ert's test suite, and we already have workarounds for that case, right? > This is relatively rare compared to the problems at hand (macro and > argument errors), so unless there are unforeseen issues I think it's an > acceptable stop-gap solution. Hopefully Someone=E2=84=A2 can properly fix= this > eventually. Yes, I think this approach is acceptable.