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.bugs
Subject: bug#41988: 28.0.50;
Edebug unconditionally instruments definitions with &define specs
Date: Sun, 4 Apr 2021 20:40:11 +0200
Message-ID:
References:
<6D19F14E-0133-4751-B0BD-EC2A73C1D21F@gmail.com>
<3619E155-8F06-4F8F-B239-121ED3D164A8@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
logging-data="20008"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: 41988@debbugs.gnu.org
To: Stefan Monnier
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 04 20:41:12 2021
Return-path:
Envelope-to: geb-bug-gnu-emacs@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 1lT7gM-00055u-OB
for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Apr 2021 20:41:10 +0200
Original-Received: from localhost ([::1]:43222 helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1lT7gL-0005Nx-9z
for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Apr 2021 14:41:09 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54452)
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1lT7gE-0005Nd-6U
for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 14:41:02 -0400
Original-Received: from debbugs.gnu.org ([209.51.188.43]:53139)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from )
id 1lT7gD-0004Jx-Uz
for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 14:41:01 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
(envelope-from ) id 1lT7gD-0005ha-RC
for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 14:41:01 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Philipp Stephani
Original-Sender: "Debbugs-submit"
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sun, 04 Apr 2021 18:41:01 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 41988
X-GNU-PR-Package: emacs
Original-Received: via spool by 41988-submit@debbugs.gnu.org id=B41988.161756162921873
(code B ref 41988); Sun, 04 Apr 2021 18:41:01 +0000
Original-Received: (at 41988) by debbugs.gnu.org; 4 Apr 2021 18:40:29 +0000
Original-Received: from localhost ([127.0.0.1]:36452 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1lT7fh-0005gj-Fc
for submit@debbugs.gnu.org; Sun, 04 Apr 2021 14:40:29 -0400
Original-Received: from mail-oo1-f53.google.com ([209.85.161.53]:39725)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1lT7fg-0005gU-9D
for 41988@debbugs.gnu.org; Sun, 04 Apr 2021 14:40:28 -0400
Original-Received: by mail-oo1-f53.google.com with SMTP id
r17-20020a4acb110000b02901b657f28cdcso2427524ooq.6
for <41988@debbugs.gnu.org>; Sun, 04 Apr 2021 11:40:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc:content-transfer-encoding;
bh=tWRcDBDJKn9qLaqsRWAueWctRvLL9CP5CJfSHYk+sRw=;
b=ZUv+frYYHXWUAd5c6V+TDkGxtLqF7xBRo6OC8nN1uo8NWpGjeTzwNlh7i8WisTcLJd
Q+z5sOMYeSV9P8AiBoToWQGmmXZrwpqf9amooZO2zWVrK2H16lAxY6DtfYdo0npHnnxo
9/AyzY3Jw8H58503snB/M28PpWknMHNB5HGLD+qNHHDuTI37UuL4EKuQ29VGRIO/lu2T
LSdzWpnlBktbXkONONnl/5MZksz15zNPz/eC9AU3Mvgt6r3FFL0Q9Jzx3a1R1Y4lDj7T
1N73vYs+7jGb/o3n/d2VlCBqZNteyfNnSqr4i1pcpVzyibDdVqxLxAyJtZsNPjXO5aQw
O2sQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc:content-transfer-encoding;
bh=tWRcDBDJKn9qLaqsRWAueWctRvLL9CP5CJfSHYk+sRw=;
b=W19cjTHMao9WTbROywV2F6sSoYvE1tGuTGb3Vhq2bCdCvp/O0iiSFv97vkuuVeJs3Z
2Fqeu27gBXGnEKh//XY6Bf4znk/6Ch+4gyYEjOBPoVJHm2BzNH55yO0RC7QGot0jsoJy
LlczHJGwBYDZAxxd7NpjaXyLuu2/paRgvNktVPHGKi8BBatZJRy+e0lDbgK5/+B4ZK+f
93rBrgwZIHE0As93D4TZXYC/ThCJKrxgSjYNtaLOcJAHqKtOZ/zqURwXqNhiIP50NP0w
yTqN58PQy+MQElARbggOVWF9ie8jPDAefS/pm+PokQ3P8xFxfvttXALMb4443+r32LRp
eZGA==
X-Gm-Message-State: AOAM530uwdK8935dQBPa923J/FqADVLaw3Zdrw0rbqcicugIVkxBEUOR
hzZ+Cq1r+wBJpnJpoKkNhWAy5AD9cHpzLJYRtAo=
X-Google-Smtp-Source: ABdhPJzxo0490g1hkhBdZ4cepQezzB/aZuHgO0GqTMK5EtJ5mH7aCEoEInhI99fsepXCJanhI1PAySlHCsxcW0EB+FY=
X-Received: by 2002:a4a:bd1a:: with SMTP id n26mr19503741oop.45.1617561622524;
Sun, 04 Apr 2021 11:40:22 -0700 (PDT)
In-Reply-To:
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
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-mx.org@gnu.org
Original-Sender: "bug-gnu-emacs"
Xref: news.gmane.io gmane.emacs.bugs:203554
Archived-At:
Am So., 21. M=C3=A4rz 2021 um 15:37 Uhr schrieb Stefan Monnier
:
>
> >> - The old spec of `cl-flet` would be broken by such a change, so if we
> >> want to make such a change, we'd probably want to arrange so that it
> >> emits a clear warning.
> > Where? When setting the debug specification (byte-run--set-debug), or =
in some other place?
>
> The old spec was of the form (or (&define name form) (&define name sexp
> body)), so if we put a gate at `&define`, this will probably fail to even=
match
> the (&define name sexp body) part.
Correct, this would turn a mismatch into a hard error.
>
> [ Disclaimer: I don't understand the precise semantics of `gate`, tho
> I do remember using it once via trial-and-error. So maybe it wouldn't
> prevent it, but if doesn't prevent it, then it doesn't likely "fix"
> our problem ;-) ]
AIUI the semantics of "gate" aren't that complex, it just means "don't
backtrack beyond this point."
>
> >> I'm not sure it's worth the trouble: the pain seems higher than the ga=
in.
> > This bug is rather nasty when it's hit (it took me quite a while to
> > debug/hunt down),
>
> Could you remind me what was this nasty outcome?
The original bug report was
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D41853 (extremely subtle
bug due to mismatch between frequency and offset vector). I don't know
whether that problem would appear here as well, but it's nasty enough
that I'd like to prevent duplicate definitions altogether.
> In the context of
> Edebug the effect is negligible (it just emits a spurious message about
> defining an extra something, but other than that debugging works just fin=
e).
That's only true if edebug-new-definition-function handles the
"duplicate definition" case well. For example, to prevent bug#41853 I
bail out on duplicate definitions in
https://github.com/phst/rules_elisp/blob/b67339e66fed8117dc26d4d2fb2ad321c6=
6a3632/elisp/ert/runner.el#L127-L136;
that doesn't work if this bug isn't fixed.
>
> > so I think it would be reasonable to prevent. We already
> > disable backtracking for literal symbols, and I think forms that requir=
e
> > multiple &define forms with backtracking should be exceedingly rare and=
can
> > be rewritten as you did with cl-flet.
>
> Emitting a warning would be much more helpful than just silently
> "cut"ting the backtracking.
A gate isn't silent, it would cause a hard error in this case.