From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Incorrect byte compiler error/warning message positions. A possible fix. Date: Mon, 15 Nov 2021 16:19:47 -0500 Message-ID: References: <87sfvy2dsl.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29415"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 15 22:20:42 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 1mmjP7-0007QP-7S for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Nov 2021 22:20:41 +0100 Original-Received: from localhost ([::1]:55130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmjP6-0002F6-BA for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Nov 2021 16:20:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmjON-0001P7-ER for emacs-devel@gnu.org; Mon, 15 Nov 2021 16:19:55 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46911) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmjOK-0001ed-Fv for emacs-devel@gnu.org; Mon, 15 Nov 2021 16:19:54 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id EFD3D10017A; Mon, 15 Nov 2021 16:19:49 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 31AE4100135; Mon, 15 Nov 2021 16:19:48 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1637011188; bh=wGLm704LYUMSEeqglKcrDhzhoUmPZ4Crq3ouLUbE588=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=AXj83JEQp3RXIDBIms/yzXleMqlhh+7c33XDgCKYH9O57QZcTSKvceBDAwed3ebP+ bW9hKLe8bMsKhlTngOVnfi/MzgK9mxJ9iRIcaM25aX0QbBi6UEwhA6dtiTU1zosZoX KuwGHJhky4TO81DFVsy8hy3mO3HFZIkzh8z15kBWo3SoszPTXgWhfmQXwEmxV2zZjl td2KJzdSgtMKuZj3x8DDhBnjU1/AAfB8G2d6HIIKNaTYe/Ln9v3EczdJXZ7N3FE8O6 7i4Yjl7+KhQC+PPw/VnjnG0p9cHYgqner2Apt8z3jWP6/EC1ySZhbXnK2djzpXZMR8 Q0rvsPIxYS1uw== Original-Received: from ceviche (modemcable179.53-19-135.mc.videotron.ca [135.19.53.179]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 02D181208A1; Mon, 15 Nov 2021 16:19:47 -0500 (EST) In-Reply-To: (Alan Mackenzie's message of "Mon, 15 Nov 2021 11:49:51 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:279519 Archived-At: >> In my experience, the vast majority of the warning messages point to the >> correct position. But, yes, it does sometimes give the wrong position. > On 2018-11-22 (before you destroyed my test dataset by fixing all the > warnings in Emacs ;-) there were 335 warnings. 81 gave the correct > location, 254 a wrong one. FWIW, I think the current code gives (statistically) slightly less bad positions, because of changes I've made to `cconv` and `bytecomp`. That may explain Lars's impression. Our positions are still too often poor. Some of us have just grown used to missing or poor location info and don't notice them any more :-( > They should be fairly easy (if, perhaps, tedious) to solve, because > everything is under our control. Agreed. > It's macros where people outside of our control do wierd and wonderful > things. I think I know how to compile macros so that they both work, > yet preserve the symbols with position on the code they generate. > These compiled macros won't work on earlier versions of Emacs, but > that's a bridge to cross when we come to it. I'm curious know how you intend to make it work, Stefan