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.devel Subject: Re: Incorrect byte compiler error/warning message positions. A possible fix. Date: Mon, 15 Nov 2021 11:52:47 +0000 Message-ID: References: <87sfvy2dsl.fsf@gnus.org> <87sfvy0yx8.fsf@yahoo.com> 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="30499"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 15 12:54:08 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mmaYp-0007iD-8P for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Nov 2021 12:54:07 +0100 Original-Received: from localhost ([::1]:43656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmaYn-000051-Ci for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Nov 2021 06:54:05 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmaXg-0007pn-6R for emacs-devel@gnu.org; Mon, 15 Nov 2021 06:52:56 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:35815 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1mmaXZ-0003yM-50 for emacs-devel@gnu.org; Mon, 15 Nov 2021 06:52:50 -0500 Original-Received: (qmail 11179 invoked by uid 3782); 15 Nov 2021 11:52:47 -0000 Original-Received: from acm.muc.de (p4fe1595c.dip0.t-ipconnect.de [79.225.89.92]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 15 Nov 2021 12:52:47 +0100 Original-Received: (qmail 6471 invoked by uid 1000); 15 Nov 2021 11:52:47 -0000 Content-Disposition: inline In-Reply-To: <87sfvy0yx8.fsf@yahoo.com> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:279490 Archived-At: Hello, Po. On Mon, Nov 15, 2021 at 13:29:23 +0800, Po Lu wrote: > Lars Ingebrigtsen writes: > >> The byte compiler reports wrong source positions in its error and > >> warning messages; not every time, but perhaps most of the time. There > >> are currently at least six open bugs for this problem, e.g. bug #22288. > > In my experience, the vast majority of the warning messages point to the > > correct position. But, yes, it does sometimes give the wrong position. > I wouldn't say the "correct position", but somewhere close to the > correct position. > It could be, for example, a few lines above where it should actually be, > when giving diagnostics for unused lexical bindings. > But it is usually close enough for people to quickly locate and solve > the error. But not always. As I said, there are at least six bug reports about this problem. My expectations are somewhat higher. ;-) How can we call ourselves hackers, when we can't even produce a fully functional byte compiler? I'm hoping to close this gap. -- Alan Mackenzie (Nuremberg, Germany).