From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#66912: With `require', the byte compiler reports the wrong file for errors. Date: Sat, 9 Nov 2024 12:35:19 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13622"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, Eli Zaretskii , 66912@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 09 13:38:02 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 1t9kj2-0003Fo-S5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Nov 2024 13:38:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9khI-0003AA-E5; Sat, 09 Nov 2024 07:36:15 -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 1t9khA-0002qV-I1 for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 07:36: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 1t9khA-0007gs-3L for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 07:36:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=From:In-Reply-To:MIME-Version:References:Date:To:Subject; bh=n+LxuPr0q2CJ0bmrfoINzjLklQbqM0YUuF0c4vamLOU=; b=orN6eg3PQlIyPbA8sb0VFEq48peieuQpqqomOQ4DIjwaD1g9EQHMU5ZdUtkpxM48V0MK7GWqRqQZXkwKUfCvGmjzrTiIJZK5gC84UgmGQiMa+xZH/x7iHYQH0HYA/3BiXtqsBUePstnJ2xBadPDQLPKDXbWc1eL4orkjKyQt3inDHrwIV4NtnbrMEqMGe7gsO8LkQlKphHB7IZpAIXCqZHecileYJlSujDkkcfDaW+UbIbEDPYF/5OVWU6sLhp1NC9ZnHTGLCM4x6cgWVMV1q1t581rsRq9T4yP8abHS4X7MQ6nvoUY9lS7hfekMB8hVIM0e6qxlK6fjKnLGTaMfXA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t9kh7-0001xX-TH for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 07:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Nov 2024 12:36: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.17311557297484 (code B ref 66912); Sat, 09 Nov 2024 12:36:01 +0000 Original-Received: (at 66912) by debbugs.gnu.org; 9 Nov 2024 12:35:29 +0000 Original-Received: from localhost ([127.0.0.1]:53802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9kgb-0001we-9X for submit@debbugs.gnu.org; Sat, 09 Nov 2024 07:35:29 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:52651) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9kgY-0001w6-Vo for 66912@debbugs.gnu.org; Sat, 09 Nov 2024 07:35:27 -0500 Original-Received: (qmail 46884 invoked by uid 3782); 9 Nov 2024 13:35:20 +0100 Original-Received: from muc.de (pd953a3cb.dip0.t-ipconnect.de [217.83.163.203]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 09 Nov 2024 13:35:20 +0100 Original-Received: (qmail 9954 invoked by uid 1000); 9 Nov 2024 12:35:19 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:295131 Archived-At: Hello, Stefan. On Fri, Nov 08, 2024 at 15:26:51 -0500, Stefan Monnier wrote: > >> 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. That doesn't seem to address the point I made above at all. > And the full info would readily be available from `Vloads_in_progress_at_error`. Vloads_in_progress_at_error is not available to the user, being an internal variable. The problem with the Vloads_in_progress_at_error approach is that its information gets prefixed to EVERY error message which occurs while the debugger's recursive edit is in progress. This is not a Good Thing. The methods suggested so far to fix this don't as yet seem satisfactory, and we don't seem to be progressing on this front. > >> 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. No. The proposed mechanism of Vloads_still_in_progress has no influence on error-message-string. > 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. It may be low tech, but it's effective. Its simplicity makes misbehaviour unlikely. We didn't see any (that I know of) with byte-compile-form-stack. Can we get this bug closed soon, please? > Stefan -- Alan Mackenzie (Nuremberg, Germany).