* bug#71844: [PATCH] 29.1; "cucumber" in compilation-error-regexp-alist-alist is too aggressive
@ 2024-06-29 19:55 Matthew Bauer
2024-06-30 5:05 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Bauer @ 2024-06-29 19:55 UTC (permalink / raw)
To: 71844
[-- Attachment #1: Type: text/plain, Size: 710 bytes --]
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.
[-- Attachment #2: Fix "cucumber" regexp --]
[-- Type: text/x-patch, Size: 1666 bytes --]
From 3a5e45ec2d836a38348e802c441d567e070b138c Mon Sep 17 00:00:00 2001
From: Matthew Bauer <mjbauer95@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)
--
2.39.3 (Apple Git-146)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#71844: [PATCH] 29.1; "cucumber" in compilation-error-regexp-alist-alist is too aggressive
2024-06-29 19:55 bug#71844: [PATCH] 29.1; "cucumber" in compilation-error-regexp-alist-alist is too aggressive Matthew Bauer
@ 2024-06-30 5:05 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2024-06-30 5:05 UTC (permalink / raw)
To: Matthew Bauer; +Cc: 71844
> From: Matthew Bauer <mjbauer95@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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-30 5:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-29 19:55 bug#71844: [PATCH] 29.1; "cucumber" in compilation-error-regexp-alist-alist is too aggressive Matthew Bauer
2024-06-30 5:05 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.