GNU bug report logs - #37484
[PATCH] Support GNU make error messages in compile mode.

Previous Next

Package: emacs;

Reported by: Paul Smith <psmith <at> gnu.org>

Date: Sun, 22 Sep 2019 20:30:02 UTC

Severity: normal

Tags: moreinfo, patch

Merged with 37632

Done: Paul Eggert <eggert <at> cs.ucla.edu>

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 37484 in the body.
You can then email your comments to 37484 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#37484; Package emacs. (Sun, 22 Sep 2019 20:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Smith <psmith <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 22 Sep 2019 20:30:02 GMT) Full text and rfc822 format available.

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

From: Paul Smith <psmith <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Support GNU make error messages in compile mode.
Date: Sun, 22 Sep 2019 16:28:18 -0400
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Match GNU make error messages.
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data):
Test GNU make error message matching.
---
 lisp/progmodes/compile.el            | 6 ++++++
 test/lisp/progmodes/compile-tests.el | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index f0b34c702c..a98aa0c8e5 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -274,6 +274,12 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
     (ruby-Test::Unit
      "^[\t ]*\\[\\([^(].*\\):\\([1-9][0-9]*\\)\\(\\]\\)?:in " 1 2)
 
+    (gmake
+     ;; Set GNU make error messages as INFO level.
+     ;; It starts with the name of the make program which is variable,
+     ;; so don't try to match it.
+     ": \\*\\*\\* \\[\\(\\(.+?\\):\\([0-9]+\\): .+\\)\\]" 2 3 nil 0 1)
+
     (gnu
      ;; The first line matches the program name for
 
diff --git a/test/lisp/progmodes/compile-tests.el b/test/lisp/progmodes/compile-tests.el
index 0d4f7f2ff2..61e1cd110d 100644
--- a/test/lisp/progmodes/compile-tests.el
+++ b/test/lisp/progmodes/compile-tests.el
@@ -180,6 +180,12 @@
      1 0 31 "/usr/include/c++/3.3/backward/iostream.h")
     ("                 from test_clt.cc:1:"
      1 nil 1 "test_clt.cc")
+    ;; gmake
+    ("make: *** [Makefile:20: all] Error 2" 5 nil 20 "Makefile" 0)
+    ("make[4]: *** [sub/make.mk:19: all] Error 127" 8 nil 19 "sub/make.mk" 0)
+    ("gmake[4]: *** [sub/make.mk:19: all] Error 2" 9 nil 19 "sub/make.mk" 0)
+    ("gmake-4.3[4]: *** [make.mk:1119: all] Error 2" 13 nil 1119 "make.mk" 0)
+    ("Make-4.3: *** [make.INC:1119: dir/all] Error 2" 9 nil 1119 "make.INC" 0)
     ;; gnu
     ("foo.c:8: message" 1 nil 8 "foo.c")
     ("../foo.c:8: W: message" 1 nil 8 "../foo.c")
-- 
2.18.0





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37484; Package emacs. (Mon, 23 Sep 2019 22:30:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Paul Smith <psmith <at> gnu.org>
Cc: 37484 <at> debbugs.gnu.org
Subject: [PATCH] Support GNU make error messages in compile mode.
Date: Mon, 23 Sep 2019 15:29:05 -0700
Thanks, but when I tried that patch against GNU Emacs master, 'make 
check' failed with the diagnostics at the end of this email. Could you 
please look into that? Also, please note the following comment in 
compile.el, which may be an easier way for you to run the tests:

;; If you make any changes to `compilation-error-regexp-alist-alist',
;; be sure to run the ERT test in test/lisp/progmodes/compile-tests.el.
;; emacs -batch -l compile-tests.el -f ert-run-tests-batch-and-exit



Test compile-test-error-regexps backtrace:
  signal(ert-test-failed (((should msg) :form msg :value nil)))
  ert-fail(((should msg) :form msg :value nil))
  compile--test-error-line(("make: *** [Makefile:20: all] Error 2" 5 n
  mapc(compile--test-error-line (("Error on line 3 of t.f: Execution e
  #f(compiled-function () #<bytecode 0x5ef685>)()
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name compile-test-error-regexps :documenta
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co
  ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable)))
  ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
  eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
  command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/progmodes/compile-te
  command-line()
  normal-top-level()
Test compile-test-error-regexps condition:
    (ert-test-failed
     ((should msg)
      :form msg :value nil))
   FAILED  1/2  compile-test-error-regexps (0.062248 sec)




Added tag(s) moreinfo. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Tue, 24 Sep 2019 19:29:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37484; Package emacs. (Sat, 05 Oct 2019 13:45:02 GMT) Full text and rfc822 format available.

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

From: Paul Smith <psmith <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 37484 <at> debbugs.gnu.org
Subject: Re: [PATCH] Support GNU make error messages in compile mode.
Date: Sat, 05 Oct 2019 09:44:52 -0400
On Mon, 2019-09-23 at 15:29 -0700, Paul Eggert wrote:
> Thanks, but when I tried that patch against GNU Emacs master, 'make 
> check' failed with the diagnostics at the end of this email. Could you 
> please look into that? Also, please note the following comment in 
> compile.el, which may be an easier way for you to run the tests:

Oops.  The meaning of "POS" in the tests is not clearly defined (enough
for me to understand it).  Required a bit of trial and error.

I sent an update with git send-email... It seems to have created a new
bug 37632 <at> debbugs.gnu.org though.  I'm not sure how to re-send a patch
so that it's associated with an existing bug?  I guess I should have
included the old bug as a CC or something...

Sorry for the confusion and required bug wrangling :(





Merged 37484 37632. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 05 Oct 2019 13:59:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37484; Package emacs. (Sat, 05 Oct 2019 14:00:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: psmith <at> gnu.org
Cc: eggert <at> cs.ucla.edu, 37484 <at> debbugs.gnu.org
Subject: Re: bug#37484: [PATCH] Support GNU make error messages in compile
 mode.
Date: Sat, 05 Oct 2019 16:59:00 +0300
> From: Paul Smith <psmith <at> gnu.org>
> Date: Sat, 05 Oct 2019 09:44:52 -0400
> Cc: 37484 <at> debbugs.gnu.org
> 
> I sent an update with git send-email... It seems to have created a new
> bug 37632 <at> debbugs.gnu.org though.  I'm not sure how to re-send a patch
> so that it's associated with an existing bug?  I guess I should have
> included the old bug as a CC or something...

Yes.

No worries, I merged the two bugs.




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Sat, 05 Oct 2019 19:35:01 GMT) Full text and rfc822 format available.

Notification sent to Paul Smith <psmith <at> gnu.org>:
bug acknowledged by developer. (Sat, 05 Oct 2019 19:35:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Paul Smith <psmith <at> gnu.org>
Cc: 37484-done <at> debbugs.gnu.org
Subject: Re: [PATCH] Support GNU make error messages in compile mode.
Date: Sat, 5 Oct 2019 12:34:37 -0700
Thanks for the updated patch. 'make check' worked for me, and I installed it 
into the Emacs master patch and am closing the bug report.




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Sat, 05 Oct 2019 19:35:02 GMT) Full text and rfc822 format available.

Notification sent to Paul Smith <psmith <at> gnu.org>:
bug acknowledged by developer. (Sat, 05 Oct 2019 19:35:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 03 Nov 2019 12:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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