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: Fri, 08 Nov 2024 15:26:51 -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="11468"; 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 Fri Nov 08 21:28:16 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 1t9Vaa-0002iI-6Z for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Nov 2024 21:28:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9VaO-0002I1-1X; Fri, 08 Nov 2024 15:28:04 -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 1t9VaM-0002Hn-Dd for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2024 15:28:02 -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 1t9VaL-0002H0-V1 for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2024 15:28:02 -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=Om/RpzO1NMnqRZyKMC5S4aM9ykYmLE13pXOkLCWqT0I=; b=R+ov3R1P1iOuoTlJsdjYdZo2Ox+y79oCqczGPppPCsCrffzkUeZwGfMzzkCsgXqvRZVhsY/0KdwkG9v/Wq82LCpkMfxoVj/CAoaKt4pjf8KD2kBQdWLXv5tTkuyw5ABA38aAWZntk6bX9lqYFzKFKUnr2qFDuSbK0gSKnz7r5WM9IxrkVz1cQCPUrI+TviH35kwjlZ8qwJGbtNOwUxG7WHgXw6PGde05g4Xsf1Y4clAqfste9cdpDODQVllJf6Vl4DI99HlOHkIiR76DBUN+2nXo6J5PkjqJx9N8rBEuympANyXnRvIv+I73czCPMAdQruhwU+Iip3Q0VVEUhoY5hw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t9VaL-0000rH-Oi for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2024 15:28:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Nov 2024 20:28:01 +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.17310976233230 (code B ref 66912); Fri, 08 Nov 2024 20:28:01 +0000 Original-Received: (at 66912) by debbugs.gnu.org; 8 Nov 2024 20:27:03 +0000 Original-Received: from localhost ([127.0.0.1]:52285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9VZP-0000q2-Bh for submit@debbugs.gnu.org; Fri, 08 Nov 2024 15:27:03 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:57707) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9VZM-0000pV-57 for 66912@debbugs.gnu.org; Fri, 08 Nov 2024 15:27:01 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C8662444651; Fri, 8 Nov 2024 15:26:52 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1731097611; bh=jcbD0Rn/py335Lfptb0jXeFft+ybJhuXQ9kSG7UITeU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=fUZi7uroOPUqu5360oQ7caa6o/vEmoxWlioJro6XgaKULLmMcUyrC+QxKxeW3xtPG cNX1TKwRMkZ2qUuB+Web1Cp4yl7CMd+LRyIFNEZVP/oGMGhDShhs2P6sZAuMaMs9WS pn1jUKROe5fNWdBq/nCoqDCMM35Ja5IADEvETqIEgNqORB/FrY/JzbdByo54t7FA3R IHrbuo7TOMgYpcm0UEg8p+puLU+/tdI/0mAc7z7mu755nYf8Q1YHXPCWnDWs3wWbSr bPJgT2jF7dYY6ScSkzChHCA/c0vC6D5XZLDmvXpGqg2I/N9O8jdTklVrs9Tz2zXa/E YbyxWkWJTpbnw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 96B1944464D; Fri, 8 Nov 2024 15:26:51 -0500 (EST) Original-Received: from asado (bras-base-mtrlpq0776w-grc-08-184-145-223-228.dsl.bell.ca [184.145.223.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 84FF61200C7; Fri, 8 Nov 2024 15:26:51 -0500 (EST) In-Reply-To: (Alan Mackenzie's message of "Fri, 8 Nov 2024 20:01:54 +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:295087 Archived-At: >> I understand that, but I don't think it explains why you think it's >> a problem. E.g. when you're in the debugger, you can see the stack >> trace which tells you we're loading A, so you don't need to be told >> "while loading A" in the error message. > OK, I see what you mean. I took it for granted that the message should > be the same, regardless of whether it is reported by a debugger or by > the error handler. AFAIK the debugger does not emit the "error message" at all, it shows the error object instead, so it's already different. And the full info would readily be available from `Vloads_in_progress_at_error`. >> I'm just describing the way I see it: I personally don't have a good >> intuition of how/when it could misbehave nor how to work around such >> cases, whereas I very much do for the approach I propose and AFAICT it's >> not just because I proposed it but it's because it follows >> a known pattern, so I expect the same will hold for other coders. > Experience with byte-compile-form-stack suggests it won't misbehave. > Its simplicity should make it easy to think through. AFAICT (equal (error-message-string ERROR-OBJECT) (error-message-string ERROR-OBJECT)) will not always return t, which I'd consider as a misbehavior. I don't mean that we need to fix it. Just that that there *will* be misbehaviors, because we use a low-tech approach which stashes the info in a global variable. Stefan