From: npostavs@gmail.com
To: Evgeniy Dushistov <dushistov@mail.ru>
Cc: 36001@debbugs.gnu.org, Noam Postavsky <npostavs@gmail.com>
Subject: bug#36001: 26.2; compile-mode.el/compilation-mode spontaneous behaviour
Date: Thu, 30 May 2019 12:35:50 -0400 [thread overview]
Message-ID: <85ef4fdhnd.fsf@gmail.com> (raw)
In-Reply-To: <20190530135828.GA111022@15inch.localdomain> (Evgeniy Dushistov's message of "Thu, 30 May 2019 16:58:28 +0300")
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
merge 36001 25133
quit
Evgeniy Dushistov <dushistov@mail.ru> writes:
> the first error is not marked as error:
>
>> error...
>> --> macroslib/src/lib.rs:428:27
>
> I uses rust-mode, it adds some regexps to
> compilation-error-regexp-alist-alist:
>
> https://github.com/rust-lang/rust-mode/blob/master/rust-mode.el
Thanks, I attach a simple reproducer based on this, run as
emacs -Q -l bug-36001-reproducer.el -f bug-36001-reproducer
[-- Attachment #2: bug reproducer --]
[-- Type: text/plain, Size: 2883 bytes --]
(require 'compile)
(defun bug-36001-reproducer ()
(interactive)
(with-current-buffer (get-buffer-create "*test bug 36001*")
(compilation-mode)
(display-buffer (current-buffer))
(mapc
(lambda (s)
(let ((inhibit-read-only t))
(insert s))
(sit-for 0))
'(" Compiling rust_swig v0.4.0-pre (/home/evgeniy/bigdisk1/projects/rust-infra/swig/macroslib)
"
"error[E0599]: no method named `merge` found for type `typemap::TypeMap` in the current scope
"
" --> macroslib/src/lib.rs:428:27
|
428 | self.conv_map.merge(*code_id, code, target_pointer_width)?;
| ^^^^^ help: did you mean: `merge2`
|
::: macroslib/src/typemap.rs:81:1
|
81 | pub(crate) struct TypeMap {
| ------------------------- method `merge` not found for this
"))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Copied from https://github.com/rust-lang/rust-mode/raw/master/rust-mode.el
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar rustc-compilation-regexps
(let ((file "\\([^\n]+\\)")
(start-line "\\([0-9]+\\)")
(start-col "\\([0-9]+\\)"))
(let ((re (concat "^\\(?:error\\|\\(warning\\)\\)[^-]+--> \\(" file ":" start-line ":" start-col "\\)")))
(cons re '(3 4 5 (1) 2))))
"Specifications for matching errors in rustc invocations.
See `compilation-error-regexp-alist' for help on their format.")
(defvar rustc-colon-compilation-regexps
(let ((file "\\([^\n]+\\)")
(start-line "\\([0-9]+\\)")
(start-col "\\([0-9]+\\)"))
(let ((re (concat "^ *::: " file ":" start-line ":" start-col ; ::: foo/bar.rs
)))
(cons re '(1 2 3 0)))) ;; 0 for info type
"Specifications for matching `:::` hints in rustc invocations.
See `compilation-error-regexp-alist' for help on their format.")
;; Match test run failures and panics during compilation as
;; compilation warnings
(defvar cargo-compilation-regexps
'("^\\s-+thread '[^']+' panicked at \\('[^']+', \\([^:]+\\):\\([0-9]+\\)\\)" 2 3 nil nil 1)
"Specifications for matching panics in cargo test invocations.
See `compilation-error-regexp-alist' for help on their format.")
(progn
(add-to-list 'compilation-error-regexp-alist-alist
(cons 'rustc rustc-compilation-regexps))
(add-to-list 'compilation-error-regexp-alist 'rustc)
(add-to-list 'compilation-error-regexp-alist-alist
(cons 'rustc-colon rustc-colon-compilation-regexps))
(add-to-list 'compilation-error-regexp-alist 'rustc-colon)
(add-to-list 'compilation-error-regexp-alist-alist
(cons 'cargo cargo-compilation-regexps))
(add-to-list 'compilation-error-regexp-alist 'cargo)
(add-hook 'next-error-hook 'rustc-scroll-down-after-next-error))
[-- Attachment #3: Type: text/plain, Size: 94 bytes --]
The basic problem is that rust-mode is using a multiline regexp, so it's
the same bug#25133.
prev parent reply other threads:[~2019-05-30 16:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 9:49 bug#36001: 26.2; compile-mode.el/compilation-mode spontaneous behaviour Evgeniy Dushistov
2019-05-30 11:40 ` Basil L. Contovounesios
2019-05-30 14:10 ` Evgeniy Dushistov
2019-05-30 12:01 ` Noam Postavsky
2019-05-30 13:58 ` Evgeniy Dushistov
2019-05-30 16:35 ` npostavs [this message]
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=85ef4fdhnd.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=36001@debbugs.gnu.org \
--cc=dushistov@mail.ru \
/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).