From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Daniel_Mart=C3=ADn?= Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add support for parsing column numbers in Visual Studio messages Date: Fri, 28 Aug 2020 20:14:19 +0200 Message-ID: References: <0D8E28C4-DB62-4499-8364-4EEA91D8DB29@acm.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30791"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Aug 28 20:15:38 2020 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 1kBiuX-0007uI-NJ for ged-emacs-devel@m.gmane-mx.org; Fri, 28 Aug 2020 20:15:37 +0200 Original-Received: from localhost ([::1]:55192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBiuW-0007Ly-MN for ged-emacs-devel@m.gmane-mx.org; Fri, 28 Aug 2020 14:15:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBitU-0006tZ-TE for emacs-devel@gnu.org; Fri, 28 Aug 2020 14:14:33 -0400 Original-Received: from sonic306-20.consmr.mail.ir2.yahoo.com ([77.238.176.206]:44866) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kBitQ-0003e0-FK for emacs-devel@gnu.org; Fri, 28 Aug 2020 14:14:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1598638464; bh=5IekiG1BYKySGuSoC/MX8D0oBw3LU+IdkxpX18uiK8Q=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject; b=oduvZissH+5JG7RDiKJelXMxk/TQG//yKfv+YPY6KAjDu6TOt4lxXr32FwBQ+j1RJUmdV2QzEfCpXwS8z6R4JbR0pkY3j1bKu7Zr50XUd4bDq+WFG0VFWqO8pa/9m+YDc2JRBMPPuadrgItkpaBzVEeSQY/rNSdtvX7EjXtvaQEbiRSOZwuACwLz/2bf6YcZOL+wzyBgUKdEu1j7Zd5mg79A+Y5AunHe3ceM9LPgHfXkAsMI0keBrcj1w8CUcn742lOPFIHC8sZBUfLUnMXLnxU0i8WCDuhE2r+48n5wDbNGJlN4TpqRaLm0QPMJXk7QYiQlJ+bDZBhMK+0TziEfHg== X-YMail-OSG: JAYU7aMVM1nOFwmsgyplxku9LbCLPuehp0srWwIuMTxJyg4W7F4eg_Aor_EADk5 V7qJgOZkQVBaOAVgd7hERAaRNBry_lQT7WVsnKoytuMGxPe7ajMlBQFPcG6ygLLgh918KJBp4dgq Eo6LtOLk.X.R0iFy_F1eh_Dmuyg7MZAVbszrT4q83ghPKQlkpVh096yvN_h9zhof.Fv596OqDjtC PEorH06OeJNzTB22cdROp9Qi.EI.PcLRmMtGhULw2mWzel0yi6Jam_BXTLn2sheVo1qOG.DwzKRV jDYCQN78_KnSMj80BSSGEDOHaK.2ANERfTYURdDCY_xPI6jz9xAJkxKs4Irr1XIL5cLnxeB7aLS2 AAx_XUfth4ED1l.zKoESljU9HGfXwehI5EERz26IV.j_2txhfz05qIKK15wjiU2WSn1DKTWNT4RD OUh5of_tDayBsOGKJoCDBXRGhKQ_q9X4bg6msD8_4hCNMVUCyttG.Xe7BMgeJB37kTwwMQAkw3uV KSbItWILMXjdNK4HPHML5tHFYz3hNU7Np5W6ltfFGIm7fdJkqRNSupcOVDT75Tku7NV4riGhQmxu tiC9yUuklQtKR4i54l6wd.obmT_YCAc5r4dQH2LvLU8nKo2E2fQiyJ9ooxshkAbWvoIhCIoD3FjV BNYfRiK5gdG0AN_YM45g9TWBxXaop6vaztnD9v9MwjpzJ05UL3c81NbGGmd55bzATSwT6PUIg4Rl 7NSBp4KSpuTIQUMOFkqqBZU74Daqsn5yEiGBB.z6xP638kYdWxzOjsdlTcghxyUz1NuBM9y.j.de zoszx..DztaWqrSWDwbbBUHg_WOJ3HxQdkTlI9BAFC Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ir2.yahoo.com with HTTP; Fri, 28 Aug 2020 18:14:24 +0000 Original-Received: by smtp401.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID b2ef747a4d578e75a48f672467fd0ed6; Fri, 28 Aug 2020 18:14:20 +0000 (UTC) In-Reply-To: (Stefan Monnier's message of "Sun, 26 Jul 2020 17:07:21 -0400") X-Mailer: WebService/1.1.16455 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Apache-HttpAsyncClient/4.1.4 (Java/11.0.7) Received-SPF: pass client-ip=77.238.176.206; envelope-from=mardani29@yahoo.es; helo=sonic306-20.consmr.mail.ir2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/28 14:14:24 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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.23 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:254357 Archived-At: --=-=-= Content-Type: text/plain Stefan Monnier writes: > Por supuesto. Fill the form below and send it as instructed to the FSF > so they can send you the relevant paperwork to sign. > Thanks, Hello again. I've just received confirmation that my signed paperwork has been processed by the FSF staff. I've attached a new version of the patch that applies to today's master branch. Thanks. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-support-for-parsing-column-numbers-in-Visual-Stu.patch >From 7a4b7724abeee9bcda393b2ec6df2bcf7c15806e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= Date: Sun, 26 Jul 2020 15:24:59 +0200 Subject: [PATCH] Add support for parsing column numbers in Visual Studio messages * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Extend regular expression to match optional column numbers. * test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data): Add a test. * test/lisp/progmodes/compile-tests.el (compile-test-error-regexps): Update the total number of compilation errors in a test. * etc/compilation.txt: Update compilation.txt with the newly supported message format. * etc/NEWS: Advertise the feature. --- etc/NEWS | 3 +++ etc/compilation.txt | 1 + lisp/progmodes/compile.el | 4 ++-- test/lisp/progmodes/compile-tests.el | 4 +++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 964b626d7b..84aebecf7e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -557,6 +557,9 @@ case-insensitive matching of messages when the old behavior is required, but the recommended solution is to use a correctly matching regexp instead. +--- +*** Messages from Visual Studio that mention column numbers are now recognized. + ** Hi Lock mode --- diff --git a/etc/compilation.txt b/etc/compilation.txt index 8f7e290678..11aefc6bc6 100644 --- a/etc/compilation.txt +++ b/etc/compilation.txt @@ -381,6 +381,7 @@ made it more strict about the error message that follows. keyboard handler.c(537) : warning C4005: 'min' : macro redefinition d:\tmp\test.c(23) : error C2143: syntax error : missing ';' before 'if' d:\tmp\test.c(1145) : see declaration of 'nsRefPtr' +c:\tmp\test.cpp(101,11): error C4101: 'bias0123': unreferenced local variable [c:\tmp\project.vcxproj] 1>test_main.cpp(29): error C2144: syntax error : 'int' should be preceded by ';' 1>test_main.cpp(29): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1> diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index a043bbcfa3..731db0fd6d 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -221,9 +221,9 @@ compilation-error-regexp-alist-alist ;; considered before EDG. ;; The message may be a "warning", "error", or "fatal error" with ;; an error code, or "see declaration of" without an error code. - "^ *\\([0-9]+>\\)?\\(\\(?:[a-zA-Z]:\\)?[^ :(\t\n][^:(\t\n]*\\)(\\([0-9]+\\)) ?\ + "^ *\\([0-9]+>\\)?\\(\\(?:[a-zA-Z]:\\)?[^ :(\t\n][^:(\t\n]*\\)(\\([0-9]+\\)\\(?:,\\([0-9]+\\)\\)?) ?\ : \\(?:see declaration\\|\\(?:warnin\\(g\\)\\|[a-z ]+\\) C[0-9]+:\\)" - 2 3 nil (4)) + 2 3 4 (5)) (edg-1 "^\\([^ \n]+\\)(\\([0-9]+\\)): \\(?:error\\|warnin\\(g\\)\\|remar\\(k\\)\\)" diff --git a/test/lisp/progmodes/compile-tests.el b/test/lisp/progmodes/compile-tests.el index d566e7dd86..819f2e78c2 100644 --- a/test/lisp/progmodes/compile-tests.el +++ b/test/lisp/progmodes/compile-tests.el @@ -267,6 +267,8 @@ compile-tests--test-regexps-data 3 nil 29 "test_main.cpp") ("1>test_main.cpp(29): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int" 3 nil 29 "test_main.cpp") + ("C:\\tmp\\test.cpp(101,11): error C4101: 'bias0123': unreferenced local variable [C:\\tmp\\project.vcxproj]" + 1 11 101 "C:\\tmp\\test.cpp") ;; watcom ("..\\src\\ctrl\\lister.c(109): Error! E1009: Expecting ';' but found '{'" 1 nil 109 "..\\src\\ctrl\\lister.c") @@ -434,7 +436,7 @@ compile-test-error-regexps (compilation-num-warnings-found 0) (compilation-num-infos-found 0)) (mapc #'compile--test-error-line compile-tests--test-regexps-data) - (should (eq compilation-num-errors-found 94)) + (should (eq compilation-num-errors-found 95)) (should (eq compilation-num-warnings-found 35)) (should (eq compilation-num-infos-found 28))))) -- 2.28.0 --=-=-=--