You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
sys.exit(main())
File "/Library/Python/3.8/site-packages/git_stacktrace/cmd.py", line 78, in main
traceback = api.parse_trace(blob)
File "/Library/Python/3.8/site-packages/git_stacktrace/parse_trace.py", line 254, in parse_trace
raise ParseException("Unable to parse traceback")
git_stacktrace.parse_trace.ParseException: Unable to parse traceback
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.
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.
Activity
jogo commentedon Aug 5, 2022
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
joejackson1993 commentedon Aug 9, 2022
ok, so having the 'at' helped me get passed the error but the tool still isn't working for me.
I made changes to those files 8 days so I'm not sure why it didn't detect them.
joejackson1993 commentedon Aug 9, 2022
It would also be a great enhancement if this could work without other formats. Specifically when copying the stack from a debugger like intelliJ.
jogo commentedon Aug 9, 2022
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.