Is there a workaround for this type of behavior? When I have the following code in a test ns
(defn check-fn [x]
(is x))
;;;; a lot more code here
;;;
(deftest foo
(check-fn false))
and i run the test foo, i don't see the failure inside the test. I see only that the test is failing and i have to go up where check-fn is defined to see cursive highlighting that the assertion failed. The only workaround i have found so far is to temporarily wrap the (check-fn false) with an is until i'm getting failures.. any other ideas here?A colleague has a workaround to basically throw an exception, but that introduces other issues with the ergonomics
There isn't at the moment, but I've been meaning to fix this for the longest time. I'll look at this for the next release.
• trigger from REPL: cool • get the find results back on the REPL: extra cool (I hadn't even thought of that, but it seems useful)
(only works when evaluating form in file, not REPL console, as it opens the diff viewer in an inline panel)
If you haven't seen it yet, also worth reading through: https://cursive-ide.com/userguide/repl.html#showing-data-structure-diffs-from-the-repl
It can also open the diff in an editor panel, but now that I think about it that might be controlled by whether inline evaluation is enabled, not where you evaluated. I'll add an option to this: :display :inline or :display :editor like the new HTML stuff has.
One of my favorite new(er) features is:
Code -> Reformat Form
I just discovered it ~1 week ago and love it! 🙂
I have shortcut setup for it, use it often to reformat a big single-line printed data into nice form.
I'd like really to have more intellij tools from REPL! Things like (cursive/find :kw)
Interesting idea, do you mean just being able to trigger the find from the REPL, or being able to return the find results back to the REPL?
Small question around Inline REPL evaluations
Result:
Is there a way to copy the entire result, inline?
I can see how you can browse/scroll through the vector, map at a time, and copy each map separately (which is great, esp for large outputs)
But in order to copy the whole vector (with two maps inside), I usually go to the REPL, and copy the blue line:
Minor thing, really 🙂… but I was wondering…
Definitely not really a minor thing, and I'm thinking about solutions, I'm just not sure how to make it work in the UI.
Perhaps as you “arrow down” into the output, the first “item” can be the whole output, rather than immediately seq-ing through the actual items? Not sure if there are any restrictions with that idea
Kinda like folders expand in most UIs: if you collapse everything you can select the folder itself (the root of the tree)