From: Axel Forsman <axelsfor@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 58007@debbugs.gnu.org
Subject: bug#58007: 28.1; compilation-error-properties skips non-matching FILE indices
Date: Fri, 23 Sep 2022 20:29:12 +0200 [thread overview]
Message-ID: <CAPt4RUqwDE_tT=opK_J2TL0e3tkzTm9diNJ4ueo6qtBNV2y_dQ@mail.gmail.com> (raw)
In-Reply-To: <87edw23wd5.fsf@gnus.org>
[-- Attachment #1: Type: text/plain, Size: 1407 bytes --]
On Fri, Sep 23, 2022 at 6:10 PM Lars Ingebrigtsen <larsi@gnus.org> wrote:
> Do you have a test case that demonstrates the problem?
Yes, so what I initially wanted to do was parse dialyzer errors
when running using the rebar3 package manager with `rebar3 dialyzer`.
See attachment for example output.
This is what I ended up with
(setq compilation-error-regexp-alist
(cons
'("^\\(?:\n\\(.*\\)\n\\)?Line \\([0-9]+\\)\\(?: Column
\\([0-9]+\\)\\)?: " 1 2 3 1)
(cons
;; This next error regexp should not be necessary
according to documentation.
'("^Line \\([0-9]+\\)\\(?: Column \\([0-9]+\\)\\)?: " nil 1 2 1)
(eval (car (get 'compilation-error-regexp-alist
'standard-value))))))
only with the 2nd error regexp does all errors get parsed.
Though this is unexpected: In the 1st regexp
when the first subexpression containing the file name does not match,
the docs say it should act the same as the 2nd error regexp.
When I have `eval-defun`:ed the patched version of
`compilation-error-properties`,
the 1st error regexp suffices as expected.
> I think this change might be too large to apply without having an FSF
> copyright assignment on file -- would you be willing to sign such
> paperwork?
The patch is mostly all indentation changes,
but yes, if needed I would be willing
though I would have to consult with my employer first.
[-- Attachment #2: rebar3-dialyzer-example-output --]
[-- Type: application/octet-stream, Size: 1193 bytes --]
-*- mode: compilation; default-directory: "~/Documents/rebar3-test/mylib/" -*-
Compilation started at Fri Sep 23 20:06:43
rebar3 dialyzer
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling mylib
===> Dialyzer starting, this may take a while...
===> Updating plt...
===> Resolving files...
===> Checking 205 files in _build/default/rebar3_24.2_plt...
===> Doing success typing analysis...
===> Resolving files...
===> Analyzing 2 files with _build/default/rebar3_24.2_plt...
src/mylib_app.erl
Line 12 Column 1: Function test/1 has no local return
Line 12 Column 1: The pattern [] can never match the type 4
Line 15 Column 1: Function start/2 has no local return
Line 16 Column 7: The call mylib_app:test(4) will never return since it differs in the 1st argument from the success typing arguments: ([])
src/mylib_sup.erl
Line 16 Column 1: Function fin/1 has no local return
Line 16 Column 1: The pattern [] can never match the type 4
Line 19 Column 1: Function start_link/0 has no local return
===> Warnings written to _build/default/24.2.dialyzer_warnings
===> Warnings occurred running dialyzer: 7
Compilation exited abnormally with code 1 at Fri Sep 23 20:06:51
next prev parent reply other threads:[~2022-09-23 18:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 15:09 bug#58007: 28.1; compilation-error-properties skips non-matching FILE indices Axel Forsman
2022-09-23 16:10 ` Lars Ingebrigtsen
2022-09-23 18:29 ` Axel Forsman [this message]
2022-09-24 10:29 ` Lars Ingebrigtsen
2023-09-06 22:50 ` Stefan Kangas
2024-01-14 6:18 ` Stefan Kangas
2022-09-24 10:53 ` Stefan Kangas
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPt4RUqwDE_tT=opK_J2TL0e3tkzTm9diNJ4ueo6qtBNV2y_dQ@mail.gmail.com' \
--to=axelsfor@gmail.com \
--cc=58007@debbugs.gnu.org \
--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 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.