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
Less indented (but full) stacktrace in IGV #8405
Less indented (but full) stacktrace in IGV #8405
Conversation
NodeStack.Frame head = locs.bottom(); | ||
ChainNode node = new ChainNode(head, head.getLookup().lookup(Node.class), | ||
head.getNested() == null ? Children.LEAF : new ChainChildren(head)); | ||
final int indentLevel = 24; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This constant can change, but no more than to 50 as limited here.
@tkrodriguez can this go in? Working with deep (Enso interpreter) stacktraces is really hard when the stack is cut at 50 (uninteresting) frames! |
Why indent them at all? It certainly doesn't help with readability I think and indenting some and not all seems mildly confusing. |
I think you have access to the history of the code prior open sourcing, so you can find out who implemented that. Maybe @sdedic knows. My (non verified) hypothesis is: by indenting it looks more similar to VisualVM:
It helps me realize where is the root and where the top most frame is, but I am not the right person to discuss esthetics.
Please integrate whatever modification of my patch you want - even setting the indentLevel to zero or simplifying the code to have no indentation at all. In any case not seeing the whole stack is a bug and while I can rely on my own build of IGV where the indentation is limited, I have colleagues who would like to use released version of IGV (just yesterday @Akirathan contacted me with IGV issues related to #8290). Please let us not be stopped by considering esthetics too much. I can live with whatever implementation, if it shows all the frames. |
@tkrodriguez, do you think you can merge this PR? If you want to disable indentation, feel free to change the indentLevel constant to zero. Thank you. |
Truffle stack traces are huge and long. I've noticed the current IGV implementation truncates them at depth 50 cutting out the most interesting parts. While investigating how to fix that I realized the problem is in indentation. While the indentation of the stack frames is nice, it is far less important than ability to see the whole stack.
This PR inserts
org.openide.nodes.Node
instances for all frames in, but indents only last 24. As a result all the frames are available and the most important ones are nicely indented. CCing @sdedic, @tkrodriguez