Update rustic-compilation-panic regex#126
Merged
CeleritasCelery merged 1 commit intoemacs-rustic:mainfrom Apr 2, 2026
Merged
Conversation
In a recent Rust upgrade, my panic messages in tests now have an additional thread ID component after the initial `thread 'whatever'` portion of the message, like in: ``` thread 'crate::module::submodule::tests::test' (294268) panicked at lib/rs/mylib/src/module.rs:1282:76: ``` This feature was added to rustc here: rust-lang/rust#115746 This no longer matches the current regex for `rustic-compilation-panic`, which expects nothing but a space between the module and the `"panicked"`. That then breaks the "jump to failing test" functionality in test compilation buffers. To fix, I added a component to the regex that allows that value to be optionally present. I also couldn't find any existing tests for the regex, so I added a simple one. Not sure if it's in the right location, or if it should be somewhere else. The test could be more sophisticated: it doesn't validate that the appropriate groups are present, just that the regex matches.
Contributor
Author
|
For a workaround in the meantime, it seems to work well enough to just set in the (setq rustic-compilation-panic
'("thread '[^']+'\\(?: ([0-9]+)\\)? panicked at \\([^\n]+\\):\\([0-9]+\\):\\([0-9]+\\):"
1 2 3)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In a recent Rust upgrade, my panic messages in tests now have an additional thread ID component after the initial
thread 'whatever'portion of the message, like in:This feature was added to rustc here: rust-lang/rust#115746
This no longer matches the current regex for
rustic-compilation-panic, which expects nothing but a space between the module and the"panicked". That then breaks the "jump to failing test" functionality in test compilation buffers.To fix, I added a component to the regex that allows that value to be optionally present. I also couldn't find any existing tests for the regex, so I added a simple one. Not sure if it's in the right location, or if it should be somewhere else. The test could be more sophisticated: it doesn't validate that the appropriate groups are present, just that the regex matches.