From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#41988: 28.0.50; Edebug unconditionally instruments definitions with &define specs Date: Sun, 04 Apr 2021 16:16:16 -0400 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 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19978"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 41988@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 04 22:17:23 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 1lT9BT-00055J-17 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Apr 2021 22:17:23 +0200 Original-Received: from localhost ([::1]:46510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lT9BS-0008SD-2g for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Apr 2021 16:17:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lT9B8-0008S6-EO for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 16:17:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53213) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lT9B8-00052Q-7V for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 16:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lT9B8-0005Tw-11 for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 16:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Apr 2021 20:17: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.161756739319691 (code B ref 41988); Sun, 04 Apr 2021 20:17:01 +0000 Original-Received: (at 41988) by debbugs.gnu.org; 4 Apr 2021 20:16:33 +0000 Original-Received: from localhost ([127.0.0.1]:36525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lT9Ae-000579-Fg for submit@debbugs.gnu.org; Sun, 04 Apr 2021 16:16:32 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:21239) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lT9Ab-0004zg-4m for 41988@debbugs.gnu.org; Sun, 04 Apr 2021 16:16:31 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B51E280695; Sun, 4 Apr 2021 16:16:23 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 131BD8070D; Sun, 4 Apr 2021 16:16:18 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1617567378; bh=wSsMZz0/L/9so0l5w3jl5wk06YAJY7CHzFL10AfPyq8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=JdM8622J7nejrSkz/ZP3yM2OakvjUVGsbd7X8EO+qO60GTFI3OD8F4YGtzHgJECNt 18ynU3L6Jdmz9Zmc/ae1wPqbwzguyrpu/qR5pmIDqePcsZdMoyu8qGHe/7r96++SX8 BEP4OEkr3pJFtVe9huORYYmR8FH7mV8HOU9M7UXblHpuSOtVqpWYCNlvX2zTvbDcRg QuUSJudp1PySFm6SQdHeCuLWaBFvyDe04lDLUtqk1ex4XD9mmFbdla8e6SZCB9BOYr Qq4qcD5kMD1UBgaLTLMHJULf4fstMbbUwOd6unU1H2CsgEDcW5IlttxAGC9WVGmfXi bdmE9X1Ju5LtQ== Original-Received: from alfajor (104-222-126-84.cpe.teksavvy.com [104.222.126.84]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D10EC120058; Sun, 4 Apr 2021 16:16:17 -0400 (EDT) In-Reply-To: (Philipp Stephani's message of "Sun, 4 Apr 2021 20:40:11 +0200") 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:203566 Archived-At: >> [ 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." [ Yes, that's the part I understand. But it's not clear where backtracking is possible and where it's not. At least, the code that I saw in edebug.el didn't match my expectations back when I looked at it, hence my not feeling quite sure what the semantics are (and/or should be). IIRC the issue was that the scope of that effect wasn't clear: if you think of Prolog's cut, its effect is local to a particular definition, whereas I think the scope of `gate` is not nearly as clear because there isn't such a notion of "definition". ] >> >> I'm not sure it's worth the trouble: the pain seems higher than the gain. >> > 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=41853 (extremely subtle > bug due to mismatch between frequency and offset vector). Thanks, that's worst than I thought indeed. >> > so I think it would be reasonable to prevent. We already >> > disable backtracking for literal symbols, and I think forms that require >> > 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. What I meant is that a gate would just make the old cl-flet spec fail in most cases, with no explanation why that spec now fails even though it worked in the past. Stefan