unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Filipp Gunbin <fgunbin@fastmail.fm>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 18109@debbugs.gnu.org
Subject: bug#18109: 24.4.50; `compilation-error-regexp-alist-alist': wrong regexp for Maven
Date: Sun, 6 Dec 2020 16:25:27 +0100	[thread overview]
Message-ID: <28953AAF-3AE5-4D36-9120-60FA1E467BA9@acm.org> (raw)
In-Reply-To: <A538FA23-A0A9-4239-B66D-B11C345A9848@acm.org>

[-- Attachment #1: Type: text/plain, Size: 288 bytes --]

> Thus it looks like we can expect exactly one space each after the first and second colon and after the comma, instead of zero-or-more spaces

Looking at https://github.com/JetBrains/kotlin/commit/ffe8ae3840d7b9bdc82170c8181031f05ced68bd, it looks likely; here is a proposed patch.


[-- Attachment #2: 0001-Stricter-gradle-kotlin-message-pattern.patch --]
[-- Type: application/octet-stream, Size: 1940 bytes --]

From 125b6d1c9c4d852fa638a86652f0fde9a89c9d0d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= <mattiase@acm.org>
Date: Sun, 6 Dec 2020 16:22:09 +0100
Subject: [PATCH] Stricter gradle-kotlin message pattern

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Rule 'gradle-kotlin': don't be more forgiving than necessary; we know
exactly what the output looks like (see
https://github.com/JetBrains/kotlin/commit/\
ffe8ae3840d7b9bdc82170c8181031f05ced68bd) and there is no reason to
risk mismatches or expensive backtracking (bug#18109).  Recognise
'info' level messages.  Convert to rx.
---
 lisp/progmodes/compile.el | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 787f5d5ef3..bc14407155 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -241,11 +241,20 @@ compilation-error-regexp-alist-alist
     ;; GradleStyleMessagerRenderer.kt in kotlin sources, see
     ;; https://youtrack.jetbrains.com/issue/KT-34683).
     (gradle-kotlin
-     ,(concat
-       "^\\(?:\\(w\\)\\|.\\): *"            ;type
-       "\\(\\(?:[A-Za-z]:\\)?[^:\n]+\\): *" ;file
-       "(\\([0-9]+\\), *\\([0-9]+\\))")     ;line, column
-     2 3 4 (1))
+     ,(rx bol
+          (| (group "w")                ; 1: warning
+             (group (in "iv"))          ; 2: info
+             "e")                       ; error
+          ": "
+          (group                        ; 3: file
+           (? (in "A-Za-z") ":")
+           (+ (not (in "\n:"))))
+          ": ("
+          (group (+ digit))             ; 4: line
+          ", "
+          (group (+ digit))             ; 5: column
+          "): ")
+     3 4 5 (1 . 2))
 
     (iar
      "^\"\\(.*\\)\",\\([0-9]+\\)\\s-+\\(?:Error\\|Warnin\\(g\\)\\)\\[[0-9]+\\]:"
-- 
2.21.1 (Apple Git-122.3)


  reply	other threads:[~2020-12-06 15:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25 17:33 bug#18109: 24.4.50; `compilation-error-regexp-alist-alist': wrong regexp for Maven Filipp Gunbin
2014-07-26  7:22 ` Glenn Morris
2014-07-28 12:30   ` Filipp Gunbin
2014-08-03 15:12     ` Daniel Colascione
2020-09-09 11:16     ` Lars Ingebrigtsen
2020-12-03 14:59       ` Lars Ingebrigtsen
2020-12-04 18:11         ` Filipp Gunbin
2020-12-04 19:22 ` Mattias Engdegård
2020-12-05 22:21   ` Filipp Gunbin
2020-12-06  9:32     ` Mattias Engdegård
2020-12-06 14:22       ` Filipp Gunbin
2020-12-06 15:05         ` Mattias Engdegård
2020-12-06 15:25           ` Mattias Engdegård [this message]
2020-12-07 10:41           ` Filipp Gunbin
2020-12-07 13:49             ` Mattias Engdegård
2020-12-07 20:07               ` Filipp Gunbin
2020-12-09 18:41                 ` Mattias Engdegård
2020-12-10 13:12                   ` Filipp Gunbin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28953AAF-3AE5-4D36-9120-60FA1E467BA9@acm.org \
    --to=mattiase@acm.org \
    --cc=18109@debbugs.gnu.org \
    --cc=fgunbin@fastmail.fm \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).