From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Philipp Stephani
Newsgroups: gmane.emacs.devel
Subject: Re: Weird non-caught error in ERT (was: Zero byte-compiler warnings
in the test suite)
Date: Thu, 23 Dec 2021 11:04:22 +0100
Message-ID:
References:
<87ilvigl3z.fsf@gnus.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
logging-data="13408"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: Lars Ingebrigtsen , Christian Ohler ,
Stefan Kangas , Emacs developers
To: Stefan Monnier
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 23 11:06:01 2021
Return-path:
Envelope-to: ged-emacs-devel@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92)
(envelope-from )
id 1n0Kz3-0003Fq-2D
for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Dec 2021 11:06:01 +0100
Original-Received: from localhost ([::1]:38264 helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1n0Kz1-0007Sk-6q
for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Dec 2021 05:05:59 -0500
Original-Received: from eggs.gnu.org ([209.51.188.92]:34630)
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1n0Kxj-0006Kv-DD
for emacs-devel@gnu.org; Thu, 23 Dec 2021 05:04:40 -0500
Original-Received: from [2607:f8b0:4864:20::32b] (port=42978
helo=mail-ot1-x32b.google.com)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from )
id 1n0Kxg-0004nG-U2; Thu, 23 Dec 2021 05:04:39 -0500
Original-Received: by mail-ot1-x32b.google.com with SMTP id
a26-20020a9d6e9a000000b0058f37eeb861so3786453otr.9;
Thu, 23 Dec 2021 02:04:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=ehaPEhF54Qv5zkGTCMKWMCzDYr6SXIUfjscuvhC/UJ4=;
b=Wo+H6PaLhDvgWfY0JtS5GEedpXSapWmdxzSz4A1NSyVCsjOZjWOA86RLq8HqKOvq2F
KofarIqkucmiqCZeF61dN/7oAIjn6dvLJzcPXAXs2fiRWDtWb2mtZnWGEgdhyOotFfrZ
w5gzPqmwIDSl7SIe7mkrzwCfM//RURtad9NQZ7EXmbHZ9fYDiNTLcRS7XJkD3HXxod5M
qFilqLv46ndz0QsA+mY6y+KT3TuNnq3I2KyS38N1S8IDOHG9dtLkQ8tGei5BNGBVahAT
Kdrzgv2sbZB18XWzXVng5IZvaNtZBC/AFM1i0N8Vxr4TsJsODLvl8Ol9beXloZ9Ow0KQ
rlmg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=ehaPEhF54Qv5zkGTCMKWMCzDYr6SXIUfjscuvhC/UJ4=;
b=TIyd31cAN4b49cczE47aqZR7NGfvWa9pgItItmh01iy5E/CRopcpXE3Hy1LSpu5khu
MeKW5PR5UtziYhwcLxPcjXhgb05znqCWlRvL1D+JsvyLbulLsaFpJzmXWr5tntgKxTyc
3HmeeU7ZPQUQRqCUQAiJGMqX67KVlPm/E9pC8/G/Z2njFwJ3jaC10zavu+M+Jr9LoEGI
5HOZC+QAOdfQM9i5yZeh3Pq85LTHqX3W2RunHw+pk4rKPp6LtRkA5GLF10BD2TZEJFfp
936yx+Op2/ZNrc01uPdd3vB6YzAIX35QJtwDiRrayVHH6qhUO5OkzABR9iBfk9BM682Z
488A==
X-Gm-Message-State: AOAM532NFgt3MITSOqAzFEcf/hFmwAMYHDJavQvY7o3q2ZEH+IfJnjEy
cjk1gMqCmOdOQ8JVbjjon0+p82Zfb3JmK+HFN6w=
X-Google-Smtp-Source: ABdhPJyJR+yXUWcTxGxLCChNY2t6B6nV816RAhqcg/IjP2jTgp01CGCEd6W4Wo2bP6bTVRMEwG5D3EIvVAS/C65/+QM=
X-Received: by 2002:a05:6830:2019:: with SMTP id
e25mr1014698otp.96.1640253873869;
Thu, 23 Dec 2021 02:04:33 -0800 (PST)
In-Reply-To:
X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::32b
(failed)
Received-SPF: pass client-ip=2607:f8b0:4864:20::32b;
envelope-from=p.stephani2@gmail.com; helo=mail-ot1-x32b.google.com
X-Spam_score_int: -10
X-Spam_score: -1.1
X-Spam_bar: -
X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.29
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-mx.org@gnu.org
Original-Sender: "Emacs-devel"
Xref: news.gmane.io gmane.emacs.devel:282903
Archived-At:
Am Do., 23. Dez. 2021 um 01:07 Uhr schrieb Stefan Monnier
:
>
> >> I'd do something like
> >>
> >> (should-error
> >> (macroexpand-all '(pcase ...)))
> >
> > macroexpand-all didn't work, but I installed this, which seems to have
> > fixed it:
>
> Indeed, how odd. I tried:
>
> (should
> (condition-case err
> (progn
> (macroexpand-all
> '(pcase 1
> ((cl-type notatype) 'integer)))
> nil)
> (error (string-match "Unknown type notabug" (cadr err))))))
>
> and that gives me:
>
> Test pcase-tests-cl-type backtrace:
> error("Unknown type %S" notatype)
> cl-typep--inliner((cl-typep 1 'notatype) 1 'notatype)
> apply(cl-typep--inliner (cl-typep 1 'notatype) (1 'notatype))
> macroexp--compiler-macro(cl-typep--inliner (cl-typep 1 'notatype))
> macroexp--expand-all((pcase--flip cl-typep 'notatype 1))
> macroexp--all-forms((if (pcase--flip cl-typep 'notatype 1) (let nil
> macroexp--expand-all((pcase 1 ((cl-type notatype) 'integer)))
> macroexpand-all((pcase 1 ((cl-type notatype) 'integer)))
> (progn (macroexpand-all '(pcase 1 ((cl-type notatype) 'integer))) ni
> (condition-case err (progn (macroexpand-all '(pcase 1 ((cl-type nota
> [...]
>
> Notice the place where I truncated the stack: we're inside the
> `condition-case`! So why do we get a backtrace instead of letting
> `condition-case` catch the error?
>
Maybe because `should' installs a signal hook function?