Fork me on GitHub
#cider
<
2022-02-10
>
viesti06:02:59

Hmm, wonder if there's a way to copy&paste a stack trace from say logs of a server into Emacs buffer and make the lines navigable

jumar18:02:33

Perhaps cider--render-stacktrace-causes could be used? https://github.com/clojure-emacs/cider/blob/65a23e54227e3575f5a909dcfbdbbaef70d1438b/cider-eval.el#L456 But I have no idea how O:-).

viesti10:02:12

yeah kinda realised that cider gets stacktrace data from nrepl, but if I only have a text presentation, need probably to actually parse it

viesti10:02:42

but after that, could then use the machinery to make the printout navigable

viesti10:02:36

it's ok to also just read the stacktrace, somehow had this idea that what about making it navigable when pasting into emacs :)

jumar19:02:14

Intellij has such a thing and I used it a lot back in the day

viesti19:02:05

I think Eclipse also had such a thing back in the day

lassemaatta07:02:46

When cider spits out an error in the repl (e.g. a "unable to resolve a symbol" error when I try to call a non-existing function) it seems to often also show another error regarding "Cannot open <nil> as a reader".

lassemaatta07:02:29

have I messed up something in my cider setup or nrepl middlewares or something?

vemv09:02:33

what's your cider version?

vemv09:02:38

ah the stacktrace says it, you're not running a recent-enough cider-nrepl the error comes from Orchard, check out https://github.com/clojure-emacs/orchard/blob/master/CHANGELOG.md#091-2022-01-17 it has the precise fix!

lassemaatta09:02:49

CIDER 1.3.0-snapshot (package: 20220204.917)

vemv09:02:04

cider-nrepl must be 0.28.2

lassemaatta09:02:41

great, thanks 👍

vemv09:02:13

Cheers cider also lein-nvd as a plugin is deprecated, fyi

lassemaatta09:02:52

is there a source for finding out "I'm running the latest cider, what should my lein profiles look like wrt. nrepl/piggieback etc?"?

vemv09:02:57

Not that I know. Maybe you can run https://github.com/liquidz/antq#leiningen-as-a-plugin which will take into account ~/.lein/profiles.clj Running latest is generally always safe, unless it has a suffix like alpha

👍 1
bmaddy20:02:54

Is there an easy way to specify the nrepl port in my .dir-locals.el for when I'm connecting with cider-connect-cljs? Even better would be if I could tell it to look in .shadow-cljs/nrepl.port for the number. I've been looking through the docs and elisp code and haven't found anything.

bmaddy16:02:34

Those look like what I need. Thank you!