Refactor nmodl ... blame --line N.#1265
Conversation
The revised format only prints the first trace, before entering the `CodePrinter`. It also refactors the code to prepare for injecting a detailed blame printer, when needed.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1265 +/- ##
==========================================
+ Coverage 86.35% 86.36% +0.01%
==========================================
Files 175 178 +3
Lines 13214 13246 +32
==========================================
+ Hits 11411 11440 +29
- Misses 1803 1806 +3 ☔ View full report in Codecov by Sentry. |
|
Logfiles from GitLab pipeline #211217 (:white_check_mark:) have been uploaded here! Status and direct links: |
|
Does this mean we'll no longer get multiple stack traces for a single line of NMODL codegen output? If so, I'm very much for it! |
|
Naturally, there are multiple stacks per line of output. Simply because multiple distinct statements can contribute to a single line of code. What this does is only print one "trace" or frame per stack trace, i.e. per call to the printer that causes changed to specified line. The trace shown will be the lowest call before entering the "printer". The hope is that this is usually the trace of interest. You can see the complete output above (which used to be multiple pages of scrollback). If in future we notice that sometimes we need more context, e.g. when a generic function calls the printer, we can implement a flag |
JCGoran
left a comment
There was a problem hiding this comment.
Just checked, a multi-thousand line backtrace was reduced to something like 30 lines, much nicer to debug things now! LGTM
|
I'm wondering what miserable line you're debugging =) |
The revised format only prints the first trace, before entering the `CodePrinter`. It also refactors the code to prepare for injecting a detailed blame printer, when needed. NMODL Repo SHA: BlueBrain/nmodl@24706b5
The revised format only prints the first trace, before entering the
CodePrinter. The new output (for a particularly verbose case) is:It also refactors the code to prepare for injecting a detailed blame printer, when needed.