git-stacktrace
git-stacktrace copied to clipboard
Unable to parse traceback
I'm trying to use this with a java stack trace, which I think is supported. However, I'm getting an error.
Traceback (most recent call last):
File "/usr/local/bin/git-stacktrace", line 10, in
This is my example stack trace copied from intelliJ substituteVariables:1779, StringUtil (com.company.util) substituteVariables:1857, StringUtil (com.company.util) substituteVariables:1834, StringUtil (com.company.util) substituteVariableWithNullMethodReturnsEmptyString:439, StringUtilTest (com.company.util)
Thanks for the bug report, java support definitely has a some edge cases remaining. If you can provide a full (synthetic?) stack trace that is currently failing I can look into it further.
The format I have been testing against is something like this (from current tests), so looking for the first line and the 'at' lines
java.io.FileNotFoundException: foo (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at com.devdaily.tests.ExceptionTest.(ExceptionTest.java:15)
at com.devdaily.tests.ExceptionTest.main(ExceptionTest.java:36)
ok, so having the 'at' helped me get passed the error but the tool still isn't working for me.
❯ git stacktrace --since=20.day < ~/Documents/stack1.txt
commit range: 62dc2d4285835fd88e118b20b5df4a6c2b80e43c..0b50b0a989ed1d705cab6ad0eca9953f39fdf658
java.lang.Exception: Dump The Stack
at com.glide.util.Log.dumpStack(Log.java:376)
at com.glide.util.Log.dumpStack(Log.java:367)
at com.glide.util.StringUtil.substituteVariables(StringUtil.java:1855)
at com.glide.util.StringUtil.substituteVariables(StringUtil.java:1841)
at com.glide.util.StringUtil.substituteVariables(StringUtil.java:1830)
No matches found
I made changes to those files 8 days so I'm not sure why it didn't detect them.
It would also be a great enhancement if this could work without other formats. Specifically when copying the stack from a debugger like intelliJ.
Unfortunately the only way I know how to debug why a match wasn't found is by being able to locally reproduce the issue. which means having a copy of the repo and the trace.
As for the trace format I personally haven't used intelliJ, so am not familiar with exactly what it does or what format it uses. That being said adding support for this format sounds like a nice enchainment, if you are interested in contributing it.