GNU bug report logs - #39981
[PATCH] compilation-error-regexp-alist-alist: Support gulp.js

Previous Next

Package: emacs;

Reported by: Štěpán Němec <stepnem <at> gmail.com>

Date: Sun, 8 Mar 2020 09:14:02 UTC

Severity: normal

Tags: patch

Done: Štěpán Němec <stepnem <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39981 in the body.
You can then email your comments to 39981 AT debbugs.gnu.org in the normal way.

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#39981; Package emacs. (Sun, 08 Mar 2020 09:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Štěpán Němec <stepnem <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 08 Mar 2020 09:14:02 GMT) Full text and rfc822 format available.

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

From: Štěpán Němec <stepnem <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] compilation-error-regexp-alist-alist: Support gulp.js
Date: Sun,  8 Mar 2020 10:13:40 +0100
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Add support for gulp.js (<https://gulpjs.com/>) error format.
---
 lisp/progmodes/compile.el            | 4 ++++
 test/lisp/progmodes/compile-tests.el | 5 ++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 455f181f50..c2b7fb7e7b 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -249,6 +249,10 @@ compilation-error-regexp-alist-alist
        "(\\([0-9]+\\), *\\([0-9]+\\))")     ;line, column
      2 3 4 (1))
 
+    ;; https://gulpjs.com/
+    (gulp
+     "^\\(/.+\\)\n *\\([0-9]+\\):\\([0-9]+\\) +error " 1 2 3)
+
     (iar
      "^\"\\(.*\\)\",\\([0-9]+\\)\\s-+\\(?:Error\\|Warnin\\(g\\)\\)\\[[0-9]+\\]:"
      1 2 nil (3))
diff --git a/test/lisp/progmodes/compile-tests.el b/test/lisp/progmodes/compile-tests.el
index 75962566f1..57cbb2dcb0 100644
--- a/test/lisp/progmodes/compile-tests.el
+++ b/test/lisp/progmodes/compile-tests.el
@@ -138,6 +138,9 @@ compile-tests--test-regexps-data
      1 nil 10 "arrayclash.f")
     ("Nonportable usage near line 31 col 9 file assign.f: mixed default and explicit"
      24 9 31 "assign.f")
+    ;; https://gulpjs.com/
+    ("/home/user/directory/path/to/some/file.js\n  39:25  error  Extra semicolon  semi"
+     1 25 39 "/home/user/directory/path/to/some/file.js")
     ;; iar
     ("\"foo.c\",3  Error[32]: Error message"
      1 nil 3 "foo.c")
@@ -431,7 +434,7 @@ compile-test-error-regexps
           (compilation-num-warnings-found 0)
           (compilation-num-infos-found 0))
       (mapc #'compile--test-error-line compile-tests--test-regexps-data)
-      (should (eq compilation-num-errors-found 93))
+      (should (eq compilation-num-errors-found 94))
       (should (eq compilation-num-warnings-found 36))
       (should (eq compilation-num-infos-found 26)))))
 
-- 
2.25.1





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39981; Package emacs. (Sun, 08 Mar 2020 16:08:02 GMT) Full text and rfc822 format available.

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

From: Mattias Engdegård <mattiase <at> acm.org>
To: Štěpán Němec <stepnem <at> gmail.com>
Cc: 39981 <at> debbugs.gnu.org
Subject: #39981: [PATCH] compilation-error-regexp-alist-alist: Support gulp.js
Date: Sun, 8 Mar 2020 17:07:02 +0100
Thank you! However, it's another rather odd message format, and in the already crowded compilation-error-regexp-alist-alist, it risks slowing down matching quite a bit and even produce false matches.

Do you think it would be possible to ask the Gulp authors to switch to the standard GNU message format? Their non-Emacs users would benefit as well, since that format is widely used and understood by other tools.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39981; Package emacs. (Sun, 08 Mar 2020 16:36:01 GMT) Full text and rfc822 format available.

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

From: Štěpán Němec <stepnem <at> gmail.com>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: 39981 <at> debbugs.gnu.org
Subject: Re: #39981: [PATCH] compilation-error-regexp-alist-alist: Support
 gulp.js
Date: Sun, 08 Mar 2020 17:35:31 +0100
On Sun, 08 Mar 2020 17:07:02 +0100
Mattias Engdegård wrote:

> Do you think it would be possible to ask the Gulp authors to switch to
> the standard GNU message format? Their non-Emacs users would benefit
> as well, since that format is widely used and understood by other
> tools.

I don't know anything about the project's development, but now I that
looked, the main repository seems to be this (MIT license):

  https://github.com/gulpjs/gulp

Furthemore, from https://github.com/gulpjs/gulp/blob/master/CONTRIBUTING.md:

"GitHub issues are the primary way for communicating about specific
proposed changes to this project."

I tried searching both open and closed issues and haven't found anything
relevant to this. Would you be willing to open an issue there and
describe the problem as you perceive it, or shall I?

-- 
Štěpán




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39981; Package emacs. (Sun, 08 Mar 2020 20:18:01 GMT) Full text and rfc822 format available.

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

From: Mattias Engdegård <mattiase <at> acm.org>
To: Štěpán Němec <stepnem <at> gmail.com>
Cc: 39981 <at> debbugs.gnu.org
Subject: Re: #39981: [PATCH] compilation-error-regexp-alist-alist: Support
 gulp.js
Date: Sun, 8 Mar 2020 21:17:51 +0100
8 mars 2020 kl. 17.35 skrev Štěpán Němec <stepnem <at> gmail.com>:

> I tried searching both open and closed issues and haven't found anything
> relevant to this. Would you be willing to open an issue there and
> describe the problem as you perceive it, or shall I?

Oh, would you do it? I'm not a user of Gulp at all. I couldn't even find the code responsible for emitting errors in there!





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39981; Package emacs. (Sun, 08 Mar 2020 21:50:02 GMT) Full text and rfc822 format available.

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

From: Štěpán Němec <stepnem <at> gmail.com>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: 39981 <at> debbugs.gnu.org
Subject: Re: #39981: [PATCH] compilation-error-regexp-alist-alist: Support
 gulp.js
Date: Sun, 08 Mar 2020 22:49:36 +0100
close 39981
thanks

On Sun, 08 Mar 2020 21:17:51 +0100
Mattias Engdegård wrote:

> 8 mars 2020 kl. 17.35 skrev Štěpán Němec <stepnem <at> gmail.com>:
>
>> I tried searching both open and closed issues and haven't found anything
>> relevant to this. Would you be willing to open an issue there and
>> describe the problem as you perceive it, or shall I?
>
> Oh, would you do it? I'm not a user of Gulp at all. I couldn't even find the code responsible for emitting errors in there!

OK, after some fumbling through the maze of the various gulp module
repositories I realized that this particular output format is just the
default of one of the plugins, namely gulp-eslint, eslint being a
standalone JavaScript linter which is easily configurable, e.g. choosing
the "unix" formatter gives the standard "/pa/th:line:col:" format:

  https://eslint.org/docs/user-guide/formatters/#unix

So this all was just a false alarm and me being a fool (arguably
gulp-eslint could choose saner default, but in any case there is nothing
to fix in Emacs). Sorry for wasting your time!

I am hereby closing the bug report, thank you.

-- 
Štěpán




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39981; Package emacs. (Sun, 08 Mar 2020 21:54:01 GMT) Full text and rfc822 format available.

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

From: Mattias Engdegård <mattiase <at> acm.org>
To: Štěpán Němec <stepnem <at> gmail.com>
Cc: 39981 <at> debbugs.gnu.org
Subject: Re: #39981: [PATCH] compilation-error-regexp-alist-alist: Support
 gulp.js
Date: Sun, 8 Mar 2020 22:53:13 +0100
8 mars 2020 kl. 22.49 skrev Štěpán Němec <stepnem <at> gmail.com>:

> So this all was just a false alarm and me being a fool (arguably
> gulp-eslint could choose saner default, but in any case there is nothing
> to fix in Emacs). Sorry for wasting your time!

For the record, the investigation you just made was anything but the work of a fool. Well done!





Reply sent to Štěpán Němec <stepnem <at> gmail.com>:
You have taken responsibility. (Sun, 08 Mar 2020 22:10:02 GMT) Full text and rfc822 format available.

Notification sent to Štěpán Němec <stepnem <at> gmail.com>:
bug acknowledged by developer. (Sun, 08 Mar 2020 22:10:02 GMT) Full text and rfc822 format available.

Message #25 received at 39981-done <at> debbugs.gnu.org (full text, mbox):

From: Štěpán Němec <stepnem <at> gmail.com>
To: 39981-done <at> debbugs.gnu.org
Subject: Re: #39981: [PATCH] compilation-error-regexp-alist-alist: Support
 gulp.js
Date: Sun, 08 Mar 2020 23:10:02 +0100
False alarm; no Emacs action necessary.

-- 
Štěpán




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 06 Apr 2020 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 75 days ago.

Previous Next


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