cursive

henrik 2026-04-23T08:44:21.550919Z

I’m not sure if I’ve flipped some switch accidentally, but exceptions surface without details (stack trace, most notably) when running from the REPL. Ie., this is all the info I get:

Execution error (ExceptionInfo) at co.multiply.app.util.anomaly/anomaly-exception (anomaly.cljc:234).
Cannot invoke "java.lang.Number.doubleValue()" because "x" is null
If I want more, I have to surround the command in a try/catch and log the exception object. Have I screwed up some config?

henrik 2026-05-06T07:01:09.064659Z

Right, to be clear, I’m not typing things manually into the REPL window, I’m sending forms. Both are similarly stripped down versions, at least for me. Yeah, I understand that they can be overwhelming for people. I have a lot of async code though, and usually the stacktraces are shorter than I would like anyway, so I kind of need them.

henrik 2026-05-06T07:06:58.323249Z

@mgardner2 *e works pretty well (I think). Didn’t the inline version use to have this detail included previously?

cfleming 2026-05-06T09:18:16.022119Z

I'll check this, because I'm sure I usually get the trace inline.

🙏 1
cfleming 2026-04-23T09:40:19.839269Z

I don't think there are any flags for this - just to be clear, you're talking about what you see in the REPL output pane, right? Not inline in the editor.

henrik 2026-04-23T09:42:22.925409Z

Right. The editor pops up the same message:

cfleming 2026-04-23T09:48:05.181609Z

Ok, I'll check that tomorrow.

🙏 1
eskos 2026-04-23T13:22:48.407839Z

Could be this? https://www.metosin.fi/blog/missing-stacktraces

henrik 2026-04-23T14:37:57.589739Z

That could absolutely be it: I can see that it’s been added to the deps.edn.

salam 2026-04-23T15:32:21.882749Z

i think the advice in the Metosin article is out of date now that Clojure CLI sets the JVM flag by defulat since version 1.11.1.1208: https://clojure.atlassian.net/browse/TDEPS-234.

henrik 2026-04-24T06:36:17.231799Z

Ah, gotcha. Yeah, removing it made no difference.

henrik 2026-05-05T15:50:04.778719Z

Thanks for looking into it. I think I’ve seen more fully fledged, browseable exceptions after 1.10, but maybe I’m misremembering. Does this mean that this is not unique to me? You see the same?

MJ 2026-05-05T20:18:43.372419Z

@henrik I assume you're aware of *e?

cfleming 2026-05-05T21:59:16.773039Z

> Does this mean that this is not unique to me? You see the same? Yes, but with a caveat - I hadn't seen this for a long time because I use the inline REPL almost exclusively these days, which renders the exceptions differently. If I do need to use the REPL view for some reason, I use *e. But I think it's true that I do that basically every time I see an exception.

cfleming 2026-05-05T22:00:23.004659Z

This is a bit of a tricky one - the core team removed the stack traces on every exception because so many people complained about seeing them. It's definitely a bit of a damned if you do, damned if you don't situation.

cfleming 2026-05-05T22:00:59.927349Z

For Cursive, I think I can add a config flag to specify which behaviour you want - perhaps none, prettified or full Java-style.

cfleming 2026-05-05T00:28:17.090419Z

Sorry for the delay, I went through and checked this. Cursive is actually reproducing what the standard clojure.main REPL does since 1.10, which triages the exception and only prints the error message. However, in Clojure itself you can get the Full report at: /tmp/...edn using -M -e, Cursive should probably provide something similar.

Rachel Westmacott 2026-04-23T12:58:32.300309Z

Does Cursive do anything to interact with IntelliJ's 'Optimize Imports' command? It seems to work very nicely, except that it and clj-kondo seem to disagree about the ordering of the following cljs requires:

[goog.crypt.Sha1]
    [goog.crypt.base64 :as b64]

Rachel Westmacott 2026-04-23T13:00:30.335039Z

I assume it is case-related. It's lightly sub-optimal as we have to avoid optimizing those imports (which is frequently useful) to not break the linter.

borkdude 2026-04-23T13:08:51.464569Z

clojure-lsp also agrees with what clj-kondo does I believe

cfleming 2026-04-24T00:35:35.209249Z

Yes, that's Cursive's implementation, I'll check that and fix.

1
cfleming 2026-05-14T23:53:07.969009Z

https://github.com/cursive-ide/cursive/issues/3097

👍 1