-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compilation-error-regexp does not always match test outputs #573
Comments
Interestingly I was working on the same issue today, with a similar workaround. I'm wondering if you're sure that this ever worked, because I was thinking of providing a MR which adds a regex like yours to |
The Value in #<buffer *cargo-clippy*>
((rustic-panic
"thread '[^']+' panicked at '[^']+', \\([^\n]+\\):\\([0-9]+\\):\\([0-9]+\\)"
1 2 3)
(rustic-info "^ *::: \\([^\n]+\\):\\([0-9]+\\):\\([0-9]+\\)" 1 2 3 0)
(rustic-warning
"^warning:[^\n]*\n *--> \\([^\n]+\\):\\([0-9]+\\):\\([0-9]+\\)" 1 2
3 1)
(rustic-error
"^error[^:]*:[^\n]*\n *--> \\([^\n]+\\):\\([0-9]+\\):\\([0-9]+\\)" 1
2 3)) I think the most correct solution might be to add a named entry to (add-to-list 'compilation-error-regexp-alist-alist
(cons 'rustic-new
`(,(rx "thread '"
(one-or-more (not "'"))
"' panicked at "
(group (one-or-more not-newline))
":"
(group (one-or-more digit))
":"
(group (one-or-more digit)))
1 2 3))) and then just add Seems like the current logic is defined here: Line 190 in 39423d1
I do believe the current regex did work at some point in the past. I don't remember when it stopped working, but I've just been living with it for a while. Probably a recent-ish version of rust updated the test output. I've been working on setting up a from-scratch emacs config over the past few days though, so it was an opportunity to go and re-investigate. |
Oh as soon as I posted I realized I might have misunderstood. If you're saying the |
I pushed a suggestion here #574. |
Ah, I see now. |
I believe you're right @mplanchard . That seems to be the issue. So a proper fix would be to just remove that part? |
@mplanchard did you find some time to have a look at #575? |
Yeah I think #575 makes sense to me, since I don't know of any cases where the old regex matches |
I created a PR fixing this in emacs-rustic/rustic#31. |
I'm not totally sure when this changed, but the
compilation-error-regexp
defined by rustic no longer matches the the output I get when a test assertion fails.My test output generally looks like this:
The value added for
rustic-panic
incompilation-error-regexp-alist-alist
is currently:"thread '[^']+' panicked at '[^']+', \\([^\n]+\\):\\([0-9]+\\):\\([0-9]+\\)"
The inclusion of the `'[^']+', after "panicked at" is what seems to prevent the match.
I have worked around it locally by adding the following to my
use-package
config forrustic
:which generates the regexp
"thread '[^']+' panicked at \\(.+\\):\\([[:digit:]]+\\):\\([[:digit:]]+\\)"
.With this in place, jumping back and forth between tests in the rustic test output compilation buffer works again as expected, along with jumping directly to the failing test.
The text was updated successfully, but these errors were encountered: