From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Cyril Arnould Newsgroups: gmane.emacs.bugs Subject: bug#62508: 28.2; vhdl-mode ModelSim compile warnings aren't highlighted Date: Thu, 30 Mar 2023 14:23:48 +0000 Message-ID: References: <83mt3v7r92.fsf@gnu.org> <3f86e883-98e0-66d9-ac48-b981ec6d89ff@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_AS4PR10MB611088AA85A8B77818E6BE63E38E9AS4PR10MB6110EURP_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22650"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "62508@debbugs.gnu.org" <62508@debbugs.gnu.org> To: Reto Zimmermann , Eli Zaretskii , Friedrich Beckmann Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 30 16:24:15 2023 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 1phtCI-0005gy-CU for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Mar 2023 16:24:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phtC8-0001Ui-6c; Thu, 30 Mar 2023 10:24:04 -0400 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 1phtC6-0001UZ-Pn for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2023 10:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phtC6-0002qm-Hf for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2023 10:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1phtC6-0000kF-58 for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2023 10:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Cyril Arnould Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Mar 2023 14:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62508 X-GNU-PR-Package: emacs Original-Received: via spool by 62508-submit@debbugs.gnu.org id=B62508.16801862382851 (code B ref 62508); Thu, 30 Mar 2023 14:24:02 +0000 Original-Received: (at 62508) by debbugs.gnu.org; 30 Mar 2023 14:23:58 +0000 Original-Received: from localhost ([127.0.0.1]:59160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phtC1-0000jv-Oz for submit@debbugs.gnu.org; Thu, 30 Mar 2023 10:23:58 -0400 Original-Received: from mail-ve1eur01olkn2070.outbound.protection.outlook.com ([40.92.66.70]:14498 helo=EUR01-VE1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phtBz-0000jf-FE for 62508@debbugs.gnu.org; Thu, 30 Mar 2023 10:23:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oV+veTLLaaG/scqcnDaPO1zFIABXI9gVa0HHgvO1fhH+aED9YEVlMAUsYqGzC/lhKN7CXdhVXhYagG1R9wv75txwEXM6YcZWURdNgb4ge75AisdvC9BSgkRiqUbTANEuYO7on9etWyUg1Fbjb4A7EMsgjUvaziApw0Tt4QAaUnHr1SSU1Z+n0VajraMnMebtx/8CkBP4oZG6NUpJW6XZGn3NnxZyVIW8k4OHswrfOyiof7MbpHnY6jxKl6h0RczxofZw3EypPWcka8nwb5BZ7/8BfJI9RyZssr/sdZ6tVaibCIESFbx7RvfAmj7KFxNmmjkOeJ/G08JJNfwJdswjOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CsTFdYjKwTItEhoFJWKNBsymDiU6mTguUJhgJk1CjR4=; b=V9t6/ZoCbXtvVmE6s/1Q1MoVkDuwc3Y7jmnUtOkEFsaRiHI/2FnsVW9jGXmwE0hAxeIasT49oQJ8KBG34rYszB7bAQs83iK9KHyLZuJHbTcboKGmljdZJsvx+CjGwk4d3GkAJEfUEHujXQZw5jWd60JYT3NDwjO6VvDfVDipY1K92DT2AW4Br+bb9dXu1P3l/AukKWM45zz8lwjpDT2qGrrB7DSrFfFRCGDGpA4wgBVmNgoQpQEFrlb9l6fQXElebr2qizIycpFjBPmYt8GstTQ0uOeyNWu+Kdxq9PSJqZwlJ7A2wrpiIA0WWqIANavmKnEJSAKkg5ab7lnJpbpAzg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CsTFdYjKwTItEhoFJWKNBsymDiU6mTguUJhgJk1CjR4=; b=JzY3M9K9AqrM3EO5TdYbuirYPk/tabpeQ6O3UIswvw1pam+mOrsTOPY/NswU5JHySGaTuKfosLIccpOA31hmVTYIHQJreHzVZyJdG+mLTrp9LibXO5akCVpxtY08sPM03pCcGZkO7wDVI9hpvEpQTPkSr4WjeyJ+fXuKiO+0DYx5g2qRYvRrJsN5h7CKWYlW5XM1i5NK2cjy75rNHshr8jto+OcUd2cr2iLf7vluwMzY7oHz/0fTVwwdxwsCHQC3DnaVpiNRFipN9kT2JrRmIrbsi60ksvb9x6osqdaVZAMDv9ua6g1JuPDEEt7bR9yH9WYkeZ/0zXdrJK5tfaAy/Q== Original-Received: from AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:582::17) by VI1PR10MB7671.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:1c1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.16; Thu, 30 Mar 2023 14:23:48 +0000 Original-Received: from AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM ([fe80::f212:536f:d638:ace2]) by AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM ([fe80::f212:536f:d638:ace2%5]) with mapi id 15.20.6277.013; Thu, 30 Mar 2023 14:23:48 +0000 Thread-Topic: bug#62508: 28.2; vhdl-mode ModelSim compile warnings aren't highlighted Thread-Index: AQHZYa1Q1laOLJpCPU2pD6sLx4t2kK8RmS+dgAGxMICAABZYtg== In-Reply-To: <3f86e883-98e0-66d9-ac48-b981ec6d89ff@gnu.org> Accept-Language: de-CH, en-US Content-Language: de-CH x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [hmrgQm2XG/GGVhJwwIyKLPfbyvoEYAKXDqJqvWfo8YA=] x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AS4PR10MB6110:EE_|VI1PR10MB7671:EE_ x-ms-office365-filtering-correlation-id: 75762855-3b1a-4d09-7cd3-08db312a60b1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mtgxQCWdE/8XxaJ5C8jsqkD5zhz/nJv6AtRGIoM3SOPOOmxIxMq+3XzpZAZJpJ6j8Wg0EEzPXHdiFCkT84x4ZH3z5gDjgPxCKhvLEBSkUZoRpTlSX5kGaoj41trHAp8GtA97fEadYPC1L+YaUBP59cTb0DwPFw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jKj/NP5I1iKDqwLv8F/U8QXBRYiMRxuMVfRu2xAIHxVf2/Qa5B7/2E1QVL8evcu1DWjMbv8dzf7/SyWmznvGjVlNOLpdlMshM51U2aMKA40LhTcAP4CIDdFJDFFfLeual0jzHTC0Wdfu16jkOmJnD3L3hP+QaAEupGfveqZVaNiWoYl3J0zFksi9YMy82hCI+D8ANKjwgio/7Pv0YRuvfu/9Hh A3LcySl+3zdZGb+ZzFUcSNvwuksWBMRYfaZ8/UADM60bJFEw9VXXYK0FKy9JB2Xjz5oOzqVdKX/Gt1aJoIMW7I9mra6Mc0aD60 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 75762855-3b1a-4d09-7cd3-08db312a60b1 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Mar 2023 14:23:48.3477 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB7671 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:258929 Archived-At: --_000_AS4PR10MB611088AA85A8B77818E6BE63E38E9AS4PR10MB6110EURP_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I can confirm that with the regexp above, my ModelSim also detects the warn= ings, albeit as errors. After some digging I found that when I was compiling with GHDL, it didn't a= ctually match with the GHDL regexp defined in vhdl-mode.el but with the gnu= compiler regexp, which I believe is defined in etc/compilation.txt. Makes = sense since GHDL is based on GCC. I guess differentiating between Warnings and Errors for VHDL compilers woul= d in this case be more of a feature request than a bug, so with Reto's fix = the bug can be seen as resolved. ________________________________ From: Reto Zimmermann Sent: Thursday, March 30, 2023 2:55:11 PM To: Eli Zaretskii ; Cyril Arnould = ; Friedrich Beckmann Cc: 62508@debbugs.gnu.org <62508@debbugs.gnu.org> Subject: Re: bug#62508: 28.2; vhdl-mode ModelSim compile warnings aren't hi= ghlighted I'm was not aware that *compile* buffer allows to differentiate between warnings and errors. At least vhdl-mode never supported that. I think the following ModelSim error regexp should match both formats: ("^\\(ERROR\\|WARNING\\|\\*\\* Error\\|\\*\\* Warning\\)[^:]*:\\( *\[[0-9]+\]\\| ([^)]+)\\)? \\([^ \t\n]+\\)(\\([0-9]+\\)):" 3 4 nil) Reto On 29.03.2023 13:04, Eli Zaretskii wrote: >> From: Cyril Arnould >> Date: Tue, 28 Mar 2023 19:43:40 +0000 >> >> This bug is twofold. On one hand, the current configuration of the >> ModelSim compiler is not able to parse and highlight the Warnings as >> warnings when using vhdl-compile, they are listed as errors. With GHDL >> on the other hand, the *compile* buffer differentiates between >> warnings and errors when highlighting. I can't reproduce this at home >> since I don't have a ModelSim license there, but you can see the effect >> in a screenshot from the bugfix that introduced this: >> >> https://lists.gnu.org/archive/html/bug-gnu-emacs/2014-10/msg01377.html >> >> I have tried looking into modifying the regexp but for the life of me I >> couldn't figure out how compile.el differentiates between warnings and >> errors. >> >> Now the second problem is that I believe the way bug#5768 was fixed is >> actually not compatible with ModelSim, but with ModelSim-Intel (formerly >> Altera). As the link above shows, the warnings are formatted as follows: >> >> ** Warning: [3] counter_rtl.vhd(18): (vcom-1246) Range 5 downto 6 is nul= l. >> >> My ModelSim actually formats its Warnings differently, for example: >> >> ** Warning: (vcom-1246) counter_rtl.vhd(18): Range 5 downto 6 is null. >> >> You can look into the ModelSim documentation under the "Message Format" >> Section. I am not 100% certain if the number in brackets could also >> appear in my Installation but possibly the number is just optional. The >> regexp could be modified to allow both, this would avoid introducing a >> separate Modelsim-Intel compiler. >> >> I can verify any fixes at work. > As I'm not an expert on vhdl, I CC people who might help us with this > issue. > > Thanks. --_000_AS4PR10MB611088AA85A8B77818E6BE63E38E9AS4PR10MB6110EURP_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
I can confirm that with the regexp above, my ModelSim als= o detects the warnings, albeit as errors.

After some digging I found that when I was compiling with= GHDL, it didn't actually match with the GHDL regexp defined in vhdl-mode.e= l but with the gnu compiler regexp, which I believe is defined in etc/compi= lation.txt. Makes sense since GHDL is based on GCC.

I guess differentiating between Warnings and Errors for V= HDL compilers would in this case be more of a feature request than a bug, s= o with Reto's fix the bug can be seen as resolved.



From: Reto Zimmermann <r= eto@gnu.org>
Sent: Thursday, March 30, 2023 2:55:11 PM
To: Eli Zaretskii <eliz@gnu.org>; Cyril Arnould <cyril.arno= uld@outlook.com>; Friedrich Beckmann <friedrich.beckmann@gmx.de> Cc: 62508@debbugs.gnu.org <62508@debbugs.gnu.org>
Subject: Re: bug#62508: 28.2; vhdl-mode ModelSim compile warnings ar= en't highlighted
 
I'm was not aware that *compile* buffer allows to = differentiate between
warnings and errors.  At least vhdl-mode never supported that.

I think the following ModelSim error regexp should match both formats:

("^\\(ERROR\\|WARNING\\|\\*\\* Error\\|\\*\\* Warning\\)[^:]*:\\(
*\[[0-9]+\]\\| ([^)]+)\\)? \\([^ \t\n]+\\)(\\([0-9]+\\)):" 3 4 nil)
Reto


On 29.03.2023 13:04, Eli Zaretskii wrote:
>> From: Cyril Arnould <cyril.arnould@outlook.com>
>> Date: Tue, 28 Mar 2023 19:43:40 +0000
>>
>> This bug is twofold. On one hand, the current configuration of the=
>> ModelSim compiler is not able to parse and highlight the Warnings = as
>> warnings when using vhdl-compile, they are listed as errors. With = GHDL
>> on the other hand, the *compile* buffer differentiates between
>> warnings and errors when highlighting. I can't reproduce this at h= ome
>> since I don't have a ModelSim license there, but you can see the e= ffect
>> in a screenshot from the bugfix that introduced this:
>>
>> https://lists.gnu.org/archive/html/bug-gnu-emacs/2014-10/msg01377.html<= br> >>
>> I have tried looking into modifying the regexp but for the life of= me I
>> couldn't figure out how compile.el differentiates between warnings= and
>> errors.
>>
>> Now the second problem is that I believe the way bug#5768 was fixe= d is
>> actually not compatible with ModelSim, but with ModelSim-Intel (fo= rmerly
>> Altera). As the link above shows, the warnings are formatted as fo= llows:
>>
>> ** Warning: [3] counter_rtl.vhd(18): (vcom-1246) Range 5 downto 6 = is null.
>>
>> My ModelSim actually formats its Warnings differently, for example= :
>>
>> ** Warning: (vcom-1246) counter_rtl.vhd(18): Range 5 downto 6 is n= ull.
>>
>> You can look into the ModelSim documentation under the "Messa= ge Format"
>> Section. I am not 100% certain if the number in brackets could als= o
>> appear in my Installation but possibly the number is just optional= . The
>> regexp could be modified to allow both, this would avoid introduci= ng a
>> separate Modelsim-Intel compiler.
>>
>> I can verify any fixes at work.
> As I'm not an expert on vhdl, I CC people who might help us with this<= br> > issue.
>
> Thanks.

--_000_AS4PR10MB611088AA85A8B77818E6BE63E38E9AS4PR10MB6110EURP_--