Fork me on GitHub
#emacs
<
2021-12-15
>
ag20:12:48

Has anyone figured out a way to turn java stacktraces to a nice list of namespaces/files? Why something like this:

at clojure.core$some.invoke(core.clj:2696)
can't be shown maybe something like:
clojure.core/some -- at src/clj/clojure/core.clj:2696
I refuse to believe there is no Emacs mode for that

ericdallo21:12:22

my guess is that @U04V15CAJ already asked himself something similar when implementing babashka:sweat_smile:

ag22:12:40

why? exceptions in bb scripts show something nicer?

ericdallo22:12:04

I think borkdude improved the exceptions for some cases, I remember he saying that somewhere

ericdallo22:12:30

anyway, I don't think there is a emacs mode for that unfortunatelly :/ , a clojure lib that parses that would be really cool

ag22:12:49

yeah, anything would nice. I don't like staring into stacktraces (no one does), most of the time, instead, I choose to stare at the relevant code. But when something fails in CI, I look at them and I feel like this is exactly how "hating the job" and the burnout starts.

borkdude22:12:12

The stacktraces that babashka shows aren't real Java stacktraces but interpreter stacktraces. But I think the necessary information is in the stack frames to make it look like that in normal Clojure

👍 2
andy.fingerhut14:12:50

Does Clojure on the JVM keep full paths to source files? I thought discarded the directories and only kept the final file name?

1
andy.fingerhut14:12:35

which if so, is at least one reason to use a variety of source file names, in particular avoiding core.clj in projects

borkdude14:12:03

although namespace names can be traced back to a file using io/resource and demunge