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: Mon, 04 Nov 2024 22:27:00 -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="21478"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66912@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 05 04:28:26 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 1t8AEy-0005K2-TO for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Nov 2024 04:28:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8AEf-0006vt-LA; Mon, 04 Nov 2024 22:28: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 1t8AEd-0006vX-EJ for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2024 22:28:03 -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 1t8AEd-0008DM-5a for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2024 22:28:03 -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=h+oKOlBPra1yrQ1y6kjbAz0/2R+7Mck5K+qlKrfcWYo=; b=YuNsQ6EMV+6RZAWycwOnD4fvpA0IKPyhfawv7kO/fuJyZbjdqZrPydCVuSMzA+upBMkzLIb4Xf0Moxmoh6RyPf6A0y0MyGlzrFAnDNqXrMUWembCk3EyoIZZUXDloYchoTcTk/YYeOyHb2XyWhr2+wmY94fMfwbBCe5Ag9bIXNBRqeEDNc3CxykEB4vIIoz6FGExLEDj4ignmo74ApKsfXdPP4ROsEmK9qd1jSWInL92Wzlb/30spflh5f5AYlQGCHAX+6iyTsEAFw9zHv7/Zp69zHj+NDIk1mBMa1M4Re4GYMQqpQGj/znz0GHQgl2b2nesd6svW53ShUsXx1NUgw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t8AEc-000527-0c for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2024 22:28: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: Tue, 05 Nov 2024 03: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.173077723319202 (code B ref 66912); Tue, 05 Nov 2024 03:28:01 +0000 Original-Received: (at 66912) by debbugs.gnu.org; 5 Nov 2024 03:27:13 +0000 Original-Received: from localhost ([127.0.0.1]:43067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8ADo-0004zd-PZ for submit@debbugs.gnu.org; Mon, 04 Nov 2024 22:27:13 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8ADk-0004z3-Ja for 66912@debbugs.gnu.org; Mon, 04 Nov 2024 22:27:11 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1DD714448FC; Mon, 4 Nov 2024 22:27:02 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1730777220; bh=2ChkRfVp0fEXAEAMV4Nv9q72H65QqjsNL8LXtCf2ZKM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=mylXbri178Gr2zotVGbAxnpCHcA0MAnfo4aG3WqW77tSsv+LJLo2H4CfOBf75xaDo CYYNjjVdkm1pAKc4OLY1HG30Vie3Zg7FyPI1vnyNbtkD7G9CXYd1OZ3EtoSlNjfRhv 1fLf+98re5zivN9VXgsrmoqg7EpY/iJRefvMau8O/l19b6rlZkG7qxXj5jt6Z6cC4t VLw8ZgB2rWOHanzVxjuty2sqOldW7RKjUkN3bUDBSN9NtfgwYQXXwFpeQTCp4DFiDB rdTnuyXloxGP8q3GwE2VOp2ndZ5nXQQg6in35EQGe5cuIFdh60+adc6T273E/ItU+r lreTaHY/Y+inA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id DBFA14448CA; Mon, 4 Nov 2024 22:27:00 -0500 (EST) Original-Received: from pastel (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id AF64D120370; Mon, 4 Nov 2024 22:27:00 -0500 (EST) In-Reply-To: (Alan Mackenzie's message of "Mon, 4 Nov 2024 21:08:35 +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:294894 Archived-At: > Here's the amended patch. It's a lot shorter (and easier) than the > previous version. I would like to commit it as the fix to bug#66912. Thanks. I'm not in love with this approach, among other things because of the problem I described earlier: But I don't think it would be correct in all cases: if file A loads file B which compiles file C which loads file D which signals an error we want the compiler error message to say "error in D loaded from C" and not "error in D loaded from C loaded from B loaded from A". but it's not the end of the world, so I don't object to installing it on `master`. > static Lisp_Object Vloads_in_progress; > +/* The same as the above, except it survives the unbinding done in the > + event of an error, and can thus be used in error handling. */ > +Lisp_Object Vloads_still_in_progress; Please clarify how "it survives the unbinding". [ BTW, a nice improvement would be to keep track of where we are in the outer load when the start the inner load, so that the "While loading" message can point to the place where the loading was triggered. ] Stefan