GNU bug report logs - #18109
24.4.50; `compilation-error-regexp-alist-alist': wrong regexp for Maven

Previous Next

Package: emacs;

Reported by: Filipp Gunbin <fgunbin <at> fastmail.fm>

Date: Fri, 25 Jul 2014 20:41:02 UTC

Severity: normal

Tags: moreinfo

Found in version 24.4.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Mattias EngdegÄrd <mattiase <at> acm.org>
To: Filipp Gunbin <fgunbin <at> fastmail.fm>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 18109 <at> debbugs.gnu.org
Subject: Re: bug#18109: 24.4.50; `compilation-error-regexp-alist-alist': wrong
 regexp for Maven
Date: Mon, 7 Dec 2020 14:49:40 +0100
7 dec. 2020 kl. 11.41 skrev Filipp Gunbin <fgunbin <at> fastmail.fm>:

> It was me who put there those quantifiers, and I don't object to making
> the regexps stricter.

It would be unfair to blame you for that! After all, that's how most of the other patterns were written, and for logical reasons: it seems intuitive and sensible to make the rules as loose as possible in case the format changes or there is otherwise a variation in the output. If the observed messages contain a single space in one place then standard practice has been to tolerate any number of spaces there, maybe even zero.

However, experience tells us that this intuition is wrong. Output formats do in fact tend to remain unchanged: Emacs and other editors, IDEs and other code are parsing them, and they are not all equally tolerant or in the same way. There is thus a self-reinforcing effect: the tool keeps output stable because we expect it to. (When output formats do change, it tends to be for good reasons and regexp tolerance is then rarely useful.)

> But, we just need to be aware that Java tools usually don't expect the
> output to be parsed.

Yes they do! The very composition of something like the gradle-kotlin output

e: FILENAME: (LINE, COL): MESSAGE

is so strict and formalised that it was definitely made with machine-readability in mind.

>  That is why I'm more inclined to
> making regexps more _lax_, not the other way around (and fix the
> problems with them once they appear).

As we have found out the hard way, the cost of lax patterns is insidious and diffuse until the mess really has to be sorted out -- and by then it's hard to get hold of the various people involved who have since long disappeared or forgot all about what they wrote years ago. Patterns are added independently of one another but interact in unexpected ways.

Thus, better to keep patterns strict, and only alter them when and if tool output changes; it is then clear exactly what needs to be done and why. For most rules this never becomes necessary.





This bug report was last modified 4 years and 241 days ago.

Previous Next


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