cider icon indicating copy to clipboard operation
cider copied to clipboard

Add cider-stacktrace-analyze-in-region

Open r0man opened this issue 3 years ago • 4 comments

Add command to analyze and inspect the stacktrace in region

Please see:

  • https://github.com/clojure-emacs/orchard/pull/164
  • https://github.com/clojure-emacs/cider-nrepl/pull/758

Before submitting the PR make sure the following things have been done (and denote this by checking the relevant checkboxes):

  • [x] The commits are consistent with our contribution guidelines
  • [ ] You've added tests (if possible) to cover your change(s)
  • [ ] All tests are passing (eldev test)
  • [ ] All code passes the linter (eldev lint) which is based on elisp-lint and includes
  • [ ] You've updated the changelog (if adding/changing user-visible functionality)
  • [ ] You've updated the user manual (if adding/changing user-visible functionality)

r0man avatar Sep 18 '22 18:09 r0man

Another thing that you may be interested in to do is making a stacktrace 'clickable'.

Often when a repl command emits a stacktrace, each element of that stacktrace is clickable, taking you to the right file/line. (I think if you grep for fontify you will find the related mechanism we use?)

That seems super handy as it's an "inline UI". For instance I might paste a stacktrace from Datadog into *scratch* and just leave it there for a while.

If it turns out to be disproportionately hard, then it's no big deal.

vemv avatar Sep 19 '22 04:09 vemv

Another thing that you may be interested in to do is making a stacktrace 'clickable'.

Clickable in what way? Even now you can click on stack frames and go to the revelant source code.

bbatsov avatar Sep 19 '22 05:09 bbatsov

I mean an arbitrary one e.g. pasted from the clipboard

vemv avatar Sep 19 '22 05:09 vemv

The new command should be mentioned somewhere in the mode menu and in the "dealing with stacktraces" docs.

bbatsov avatar Sep 19 '22 06:09 bbatsov

I guess we're mostly ready here and we'll move forward with a proper review after the stacktrace-related code is moved to haystack and haystack is integrated into cider-nrepl.

bbatsov avatar Oct 28 '22 10:10 bbatsov

It was an epic journey but we've made it to our destination! 🎉 Thanks for you persistence on this one and the amazing work you've done across the board! 🙇‍♂️

bbatsov avatar Dec 05 '22 13:12 bbatsov

Nice, also thanks to you and @vemv and @benedekfazekas for all the help. See you next time!

r0man avatar Dec 05 '22 17:12 r0man

Cheers 🍻

vemv avatar Dec 06 '22 00:12 vemv