-
Notifications
You must be signed in to change notification settings - Fork 6
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
panics with new lines are not matched #85
Comments
Output is parsed and matched against regular expressions line by line now, so adding new lines into the regex won't help. But the case can be handled in the Though I'm not quite sure this is the right way to go. Supporting multiline panic messages will make the parser prone to several other breakages. For instance, if one day Rust changes the source code link format in the panic messages, we will start displaying incorrect data for all the panics in notification panels. It will also break on the lines that contain something similar to a source code link. Wouldn't it be more convenient to use TODO-comments, or declare something like a |
Yes, now that I know it, I can definitely workaround that. I actually started with multiple todo testcases However
I would already consider it a huge improvement to partially match a multi-line panic, like "hey there was a panic, we couldn't capture all of details because the message was garbled, but it occurred in FILE:ROW:COL". Or just "there was at least one error we couldn't match, please look in the build output for further details". On the other hand, it would make sense for cargo to present panics in json format in the first place, wouldn't it? |
There is actually a use case in assert-rs/assert_cli#14 (comment), where some assertion macro will compare the output of a shell command with some expected value and panic with a multiline diff-message. I still see your problem in supporting this, but just want to mention that there are use cases. |
I'll try to figure something out. The vast majority of the messages are one-liners and they will effectively continue to be processed the same way they do now. But with multi-line messages you'll be at your own risk :) And you're absolutely right about output from concurrent threads. But I think this is the case we have no chance to handle properly at the time. |
@alygin Rust is going to introduce multi-line panics soon-ish for It's supposed to look like this
|
The panic message of this is matched by atom-build-cargo
However this is not matched due to the new lines
Is it possible to include new lines into the regular expression of these panics?
The text was updated successfully, but these errors were encountered: