Subject: bug#71844: [PATCH] 29.1; "cucumber" in compilation-error-regexp-alist-alist is too aggressive

From: Eli Zaretskii <[email-masked]>
Date: Sun, 30 Jun 2024 08:05:54 +0300

> From: Matthew Bauer <[email-masked]>
> 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.