GNU bug report logs - #71844
[PATCH] 29.1; "cucumber" in compilation-error-regexp-alist-alist is too aggressive

Previous Next

Package: emacs;

Reported by: Matthew Bauer <mjbauer95 <at> gmail.com>

Date: Sat, 29 Jun 2024 22:33:04 UTC

Severity: wishlist

Tags: patch

To reply to this bug, email your comments to 71844 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#71844; Package emacs. (Sat, 29 Jun 2024 22:33:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthew Bauer <mjbauer95 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 29 Jun 2024 22:33:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Matthew Bauer <mjbauer95 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] 29.1; "cucumber" in compilation-error-regexp-alist-alist is
 too aggressive
Date: Sat, 29 Jun 2024 14:55:05 -0500
[Message part 1 (text/plain, inline)]
I believe this regex for cucumber is not precise enough. Specifically,
it was picking up this indentation in an error message from GHC:

Main.hs:195:1: error: [GHC-44432]
    The type signature for ‘apathway’ lacks an accompanying binding
    Suggested fix:
      Perhaps use one of these:
        ‘foo’ (Defined at Main.hs:196:1),
        ‘foo’ (Defined at Main.hs:216:1)

It picked up this as being error messages which I believe it shouldn’t have:

   ‘foo’ (Defined at Main.hs:216
   ‘foo’ (Defined at Main.hs:216

This change just ignores it if there is remaining space. Probably it
still needs to be refined, but this at least avoids this false positive
for me.

[0001-Try-to-limit-false-positives-for-cucumber-compilatio.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71844; Package emacs. (Sun, 30 Jun 2024 05:07:01 GMT) Full text and rfc822 format available.

Message #8 received at 71844 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Matthew Bauer <mjbauer95 <at> gmail.com>
Cc: 71844 <at> debbugs.gnu.org
Subject: Re: bug#71844: [PATCH] 29.1;
 "cucumber" in compilation-error-regexp-alist-alist is too aggressive
Date: Sun, 30 Jun 2024 08:05:54 +0300
> From: Matthew Bauer <mjbauer95 <at> gmail.com>
> Date: Sat, 29 Jun 2024 14:55:05 -0500
> 
> I believe this regex for cucumber is not precise enough. Specifically,
> it was picking up this indentation in an error message from GHC:
> 
> Main.hs:195:1: error: [GHC-44432]
>     The type signature for ‘apathway’ lacks an accompanying binding
>     Suggested fix:
>       Perhaps use one of these:
>         ‘foo’ (Defined at Main.hs:196:1),
>         ‘foo’ (Defined at Main.hs:216:1)
> 
> It picked up this as being error messages which I believe it shouldn’t have:
> 
>    ‘foo’ (Defined at Main.hs:216
>    ‘foo’ (Defined at Main.hs:216

Why not? don't you want to be able to visit the definitions to examine
whether they are the right fix?

More generally, compilation-mode doesn't (yet) support the "fix
suggestion" features offered by some of the modern compilers.  IMO, we
should address this kind of situations in a general framework of
supporting fix suggestions, not just by ad-hoc changes in the regexps
that recognize error messages.  Patches welcome.




Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 11 Feb 2025 19:35:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71844; Package emacs. (Tue, 04 Mar 2025 02:16:02 GMT) Full text and rfc822 format available.

Message #13 received at 71844 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Matthew Bauer <mjbauer95 <at> gmail.com>
Cc: Mattias Engdegård <mattias.engdegard <at> gmail.com>,
 71844 <at> debbugs.gnu.org
Subject: Re: bug#71844: [PATCH] 29.1;
 "cucumber" in compilation-error-regexp-alist-alist is too aggressive
Date: Tue, 4 Mar 2025 02:15:10 +0000
Matthew Bauer <mjbauer95 <at> gmail.com> writes:

> I believe this regex for cucumber is not precise enough. Specifically,
> it was picking up this indentation in an error message from GHC:
>
> Main.hs:195:1: error: [GHC-44432]
>     The type signature for ‘apathway’ lacks an accompanying binding
>     Suggested fix:
>       Perhaps use one of these:
>         ‘foo’ (Defined at Main.hs:196:1),
>         ‘foo’ (Defined at Main.hs:216:1)
>
> It picked up this as being error messages which I believe it shouldn’t have:
>
>    ‘foo’ (Defined at Main.hs:216
>    ‘foo’ (Defined at Main.hs:216
>
> This change just ignores it if there is remaining space. Probably it
> still needs to be refined, but this at least avoids this false positive
> for me.

Mattias, maybe you have some comments on this one?

>>From 3a5e45ec2d836a38348e802c441d567e070b138c Mon Sep 17 00:00:00 2001
> From: Matthew Bauer <mjbauer95 <at> gmail.com>
> Date: Sat, 29 Jun 2024 14:45:35 -0500
> Subject: [PATCH] Try to limit false positives for cucumber compilation
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> I believe this regex for cucumber is not precise enough. Specifically,
> it was picking up this indentation in an error message from GHC:
>
> Main.hs:195:1: error: [GHC-44432]
>     The type signature for ‘apathway’ lacks an accompanying binding
>     Suggested fix:
>       Perhaps use one of these:
>         ‘foo’ (Defined at Main.hs:196:1),
>         ‘foo’ (Defined at Main.hs:216:1)
>
> It picked up this as being error messages which I believe it shouldn’t have:
>
>    ‘foo’ (Defined at Main.hs:216
>    ‘foo’ (Defined at Main.hs:216
>
> This change just ignores it if there is remaining space. Probably it
> still needs to be refined, but this at least avoids this false positive
> for me.
> ---
>  lisp/progmodes/compile.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
> index 2e4eb11811a..a03f1935971 100644
> --- a/lisp/progmodes/compile.el
> +++ b/lisp/progmodes/compile.el
> @@ -473,7 +473,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
>                     "     "))
>               "#")
>            " "
> -          (group (not "(") (* nonl))          ; file
> +          (group (not (in "( ")) (* nonl))          ; file
>            ":"
>            (group (in "1-9") (* (in "0-9"))))  ; line
>       1 2)




This bug report was last modified 157 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.