Open vemv opened 6 months ago
@alexander-yakushev a possibly easy subset of this problem is making sure that stacktraces have a reasonable length limit by default.
At the moment (cider-nrepl latest stable) they can create a huge line, slowing down Emacs.
Perhaps it's already fixed (or easy to configure) given the latest additions?
We can provide a custom print function for Exceptions that limits the length, or I suggest setting inspector's default newly introduced max-value-limit to something reasonable, 5000 or 10000 (my (* (window-width) (window-height))
is 6000). This will take care of exceptions and any other values that render into something huge and don't honor *print-length*
.
Thanks!
I'd go for the latter - seems a generalized fix for an area that could slow down Emacs (so it's reasonable to consider this broken already)
Not sure if max-value-limit can be passed from cider/cider-nrepl, that would be a nice follow-up addition.
Not sure if max-value-limit can be passed from cider/cider-nrepl, that would be a nice follow-up addition.
It will be, as new cider-nrepl ops, currently can be seen here: https://github.com/clojure-emacs/cider-nrepl/pull/869.
Currently, if we're inspecting an Exception, we cannot directly navigate to the file/line of each element of the rendered stacktrace.
i.e., this stacktrace is just text atm:
Currently, a workaround is to
d
(cider-inspector-def-current-val
) the inspected Exception, and thenthrow
it in the repl.cider-stacktrace-analyze-in-region
may also work.I think that something very "inspector-like" would be to reify the stacktrace into something that also is navigable: