From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66912: With `require', the byte compiler reports the wrong file for errors. Date: Thu, 07 Nov 2024 11:09:19 -0500 Message-ID: References: Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20471"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 66912@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 07 17:10:25 2024 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 1t955R-0004yy-PF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Nov 2024 17:10:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t955B-0001tE-Ht; Thu, 07 Nov 2024 11:10:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t955A-0001rh-Jf for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2024 11:10:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t955A-0008SN-2N for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2024 11:10:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=M7NLO3isIBnW6xziA9+IxMYKlVRrYVeW7xxbpjLHxiY=; b=QSl46if0/7K4Ya1yEwRR3I5HH6Lp2azLiCuhgIJV2mRgoXlblmkn748xLP/ki7H54YBvJV+0ap1ZtyJn/BxXIou8mY5QCSqTMS/LhXri3nWK5IcWblsfjKb5csPKfGQVnjAxHA7LRuh8Sgzg1pAgronHXqz/h1IBAbxRmmZTuT1Mq6Gej+rree+BI60+0fNaItdxvodcb8YpdlZs5BgSmpnj/KazJoUCoWNSktVdddT7pVp4HwEQfJAv2FOWX6NJgEjaDxxjWYd3pv2BoGAgSsVUyAgLA1Uv0cnztv6VxyLAzON5qtOLmay2oViumUAx6LZki0oUxZZMOlN9lpmc3w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t9558-0006pE-JO for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2024 11:10:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Nov 2024 16:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66912 X-GNU-PR-Package: emacs Original-Received: via spool by 66912-submit@debbugs.gnu.org id=B66912.173099577226182 (code B ref 66912); Thu, 07 Nov 2024 16:10:02 +0000 Original-Received: (at 66912) by debbugs.gnu.org; 7 Nov 2024 16:09:32 +0000 Original-Received: from localhost ([127.0.0.1]:49318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t954d-0006oE-QN for submit@debbugs.gnu.org; Thu, 07 Nov 2024 11:09:32 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:57192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t954Z-0006md-Fm for 66912@debbugs.gnu.org; Thu, 07 Nov 2024 11:09:30 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id EB806100383; Thu, 7 Nov 2024 11:09:20 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1730995760; bh=1qIJN0dTBnNpcjIljH6hvU/K+AT3n/n6AzuypnHA+sw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=I2lWbFyyRmAMs+WFI4q0MfaarJhBOXWLV/7u5zxgHKphQdUmiBQ4yjHxZsQJHKsHm 0QA41hHoXOrqnGd08MYOwDKK7SwwpYT7pH//l0zxDDm14ixWfbTH8vrFa0klFMtuYj uUNk/OGbWZ95FfzsYbt3GbENy/keND/wQsxBiXcJLcyXBb2KBR+WGScvwvpWSrzctY uGvDehK3useGpOYBF5h0x1filxch2LDu3oP+1TztJZgIg/HtVeMp97cOxjhO6FhSGc TQNeUAxuEcBDIEdFR7SYEQgKXDhN6WSXr6PAMA67lzclqYIHyMVVhMSf8ofsZW6zI1 bvceNeIviemQg== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 32E45100126; Thu, 7 Nov 2024 11:09:20 -0500 (EST) Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 20AE81202FD; Thu, 7 Nov 2024 11:09:20 -0500 (EST) In-Reply-To: (Alan Mackenzie's message of "Thu, 7 Nov 2024 12:37:56 +0000") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295033 Archived-At: > OK, I see what you mean. But if the error gets handled in a handler-bind > handler, or goes through to the debugger without being intercepted by a > condition-case, the binding stack will not have been unwound. In that > case the difference between the two lists would be empty. Indeed, these are cases where the error hasn't reached its corresponding handler yet. Do you think it's a problem? >> >> > I've tried it, and the above problem seems definitely to make it less >> >> > simple than the approach I originally took (which currently works). > >> >> AFAIK, your previous approach suffered from the exact same problem, tho >> >> maybe in fewer cases. > >> > No, it doesn't. There, Vloads_still_in_progress is kept in synch with >> > Vloads_in_progress when Fload operations start and end. When the >> > debugger or error handler outputs a message using Vl_still_i_p, it >> > resets that variable to nil, preventing it getting output again. > >> You may be right that the "fewer" case are so few so that there really >> aren't any. I'm not convinced there cannot be a code path that happens >> not to pass via those settings to nil, but maybe you're right. >> Still, my A => B => compile => C => D examples still stands, which is >> still at heart the same problem IMO, and could be worked around with my >> `while` loop above. > > One way to fix this would be to make Vloads_still_in_progress visible to > Lisp, and to bind it to nil in the byte compiler. But that might get a > bit complicated. And if an error in D gets handled in A, you'd have lost part of the "A => B => compile => C => D" context information because the rebinding to nil would cause `Vloads_still_in_progress_at_error` to contains only the "C => D" part. > Something very similar, if not the same, was the original handling of > byte-compile-form-stack. Something only you worked with, AFAICT. So it doesn't have the same "known issues" advantage for the rest of us. Stefan