Fork me on GitHub
#cursive
<
2023-01-05
>
grav07:01:16

Is there a way to not show the whole stack on AssertFailed?

👍 2
grav07:01:50

I remember Alex Miller mentioning on the ClojureStream podcast that it wasn't the default behaviour

cfleming09:01:02

Under which circumstances? Where do you want it to be truncated?

grav09:01:05

In this case I ran a fn that invoked clojure.walk/prewalk, and the java.lang.AssertionError happened at a place where the stack was quite large. So in the repl, it was difficult to see where what was going on.

cfleming09:01:45

Ok, do you have a link to the discussion mentioning different behaviour for that exception? I don’t think Cursive does anything along those lines right now but I’m open to adding it. It sounds like it’s possible that might be something you could control at the Clojure level too, possibly?

grav09:01:59

Yeah, might be. I might have misunderstood Alex' comment though 🙂 I'll try digging it up, one mo

cfleming09:01:38

Thanks. I’m putting my daughter to bed shortly, but drop it here if you find it and I’ll take a look when I get a chance.

grav09:01:17

At 35:45 he mentions the the Clojure Repl never automatically prints stack-traces, so that was my reference

👍 2
cfleming23:01:42

Interesting, thanks. I’ve filed https://github.com/cursive-ide/cursive/issues/2760 to look at this.

🙏 4
folcon14:01:05

For some reason cursive isn't resolving functions / vars that have been imported using an import macro, this is in a library, so code changing would be a bit of a pain, is there anything that can be done to improve resolution so stuff like autocomplete works? I'm hoping there's some special resolution that I can use which tells cursive to treat the vars differently? Resolve as declare is ok, but it would be good if I could see things like args and docstrings.

folcon17:01:04

Also it would be super helpful if there was a place where I could lookup if custom resolves are defined in cursive. I've just realised that in a project I've gotten a resolve working, but it's not clear what symbol I used to make it work.

cfleming00:01:10

You can see the resolves at: Preferences | Languages &amp; Frameworks | Clojure | Symbol Resolution

cfleming00:01:43

I’ll take a look at that import macro and see if it might be possible to resolve it as a built-in option.

folcon13:01:33

Thanks a bunch @U0567Q30W 😃...

sjharms19:01:02

Is there a way to make Cursive work with nbb? It looks like some dependencies can be put in an unused deps.edn , any other suggestions?

souenzzo22:01:33

I'm using :resource-paths ["target/cljsbuild"] lein classpath shows target/cljsbuild but cursive REPL, using "intellij classpath", do not have target/cljsbuild in the (System/getProperty "java.class.path") • why • how can I see which classpath cursive is using?

cfleming01:01:40

The classpath is available as part of the executed Java command line, which is folded at the top of each REPL when it’s run.

cfleming01:01:01

I’m not sure why that would not be working though, I’ll look into that.