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 23:15:12 -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="26215"; 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 05:16:32 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 1t8AzX-0006g7-Nl for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Nov 2024 05:16:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8Az7-0007zm-IQ; Mon, 04 Nov 2024 23:16:06 -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 1t8Az5-0007zZ-Ct for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2024 23:16: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 1t8Az5-0003lQ-1i for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2024 23:16: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=KIS54zpSYHib/RxCaFCQ9BDBfh5P+CSNQz6Z/Ef6Sqo=; b=u/k2DpwanY4usBYCZWfn5PEC+QRFSTorwITVY0+sKNfR67jFx6EKq+FjRgNBKweN64F0KE0uuUwunIP7StHeIUvA6gAHhZDX2DNVItTukCs31+FN5byuc1nuynrUpNKthxsApRBCe9do+XKfqLVtQpVqucUmlJHZZQzudigGX9cgUZOd+GHBhhcIEdEbBhILbcU6Va8LbrL+SKnCiUbBTADKjf96QsXzEPQOU2GanzlqHsOf0wcAuMfb8pv95lXQ5cSibNo5i+eWguZVCqPOkbfrKwtW72XPzoZ+TanC5+e1xR+LA8O0+A1UshQ41lyv7ocGS+lKdCFvsuojMwAOyg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t8Az3-0006wT-VL for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2024 23:16: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 04:16: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.173078012426657 (code B ref 66912); Tue, 05 Nov 2024 04:16:01 +0000 Original-Received: (at 66912) by debbugs.gnu.org; 5 Nov 2024 04:15:24 +0000 Original-Received: from localhost ([127.0.0.1]:43108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8AyS-0006vt-BI for submit@debbugs.gnu.org; Mon, 04 Nov 2024 23:15:24 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:58133) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8AyP-0006rx-FI for 66912@debbugs.gnu.org; Mon, 04 Nov 2024 23:15:23 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D4DF6444907; Mon, 4 Nov 2024 23:15:14 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1730780113; bh=5rD6lmVnfDUScSgDjXFsplhjFJG3cPMPXTlXTXHEeUk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=FI6YQiRh+bC+fZSIRZIdna+GHK+vbPnXngvV5OAytSjp5lkEDVkVqGeMDHSQtEsse QPbZsvxV9KSwKyn1RslVO5ahA4ddmks3x3yTI5837+JEiHl6B6ezT/6mXIXPmO/I2k rEqKEkE3fZ29CCktlZusC61dakGyEuOktbTOn0qMhUE3TIjhyLdPaEV9hsJDXM/YC2 TkBOcJ8aCmN5jVQiIvVOcoLM7YMyjd+jPiJs79lEd0ZeqMKjtbUdCG/KAvpkS6xbS3 K05BByX5adE+JGI8wpF8sBDw0uuvxk3RpoQ0vE5Bz696XCfJOrpfVRNEhICmFRT2M8 L54kqag+fgcEg== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id BDB0B4448FE; Mon, 4 Nov 2024 23:15:13 -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 92FC612025A; Mon, 4 Nov 2024 23:15:13 -0500 (EST) In-Reply-To: (Stefan Monnier's message of "Mon, 04 Nov 2024 22:27:00 -0500") 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:294895 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`. Also, I think it could report incorrect information in cases such as: (condition-case nil (load "FILE-A") (error ... (forward-sexp) ...)) where an error in the `forward-sexp` might be reported as occurring "while loading FILE-A" because we didn't revert the `Vloads_still_in_progress` when unwinding the stack. I suspect such situations won't occur very often, tho. Stefan