Fork me on GitHub
#cursive
<
2022-05-27
>
steveb8n01:05:41

Q: is there a new exception behaviour for the test integration. this doesn’t report an exception any more….

(deftest foo
  (/ 1 0)
  (is (= 1 1)))

1
steveb8n01:05:40

seems like all exceptions, including assertion failures, are no longer reported in the console

steveb8n01:05:05

the red failure popup is correct. just no details of why

steveb8n01:05:42

versions….

steveb8n01:05:44

IntelliJ IDEA 2021.3.2 (Ultimate Edition) Build #IU-213.6777.52, built on January 28, 2022 Runtime version: 11.0.13+7-b1751.25 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

steveb8n01:05:58

Cursive 1.12.4-eap1-2021.3

cfleming05:05:52

I’ll check that, thanks. In general I tidied things up a lot, and was wondering if I’d done too much.

cfleming05:05:19

But when I checked the stacktrace still came out in the REPL, that might have been broken by a subsequent change.

🙏 1
steveb8n08:05:15

Thanks. I've switched back to stable for now

cfleming08:05:55

Cool, I should have a fix for this out in a day or two.

🙏 3
cfleming04:05:30

That’s out now.

steveb8n07:05:58

thx. I’ll give it a roll

steveb8n22:05:26

@U0567Q30W this EAP release handles exceptions a little too well. they appear as red gutter markers but there’s no obvious way to see the stack trace. Am I missing a stack trace feature or is there another explanation?

cfleming22:05:53

The stack trace should come out in the REPL console.

cfleming22:05:02

Do you see it there? That was what happened in releases prior to the current EAPs - would you also expect to see it in the tooltip?

steveb8n22:05:03

it did not appear in the console. console would be my preference as there’s plenty of room and I can reach it with keybindings

cfleming22:05:12

That’s definitely on 1.12.4-eap2, correct? That’s odd. And you’re seeing the exception marked as a failure in the editor?

steveb8n22:05:41

it was the most recent EAP. I’ve gone back to stable because I’m testing a lot today

steveb8n22:05:57

yes the exception showed a red marker in the left gutter

cfleming22:05:06

Ok, I’ll see if I can figure out any situations where that wouldn’t happen.

steveb8n22:05:43

thx. maybe one of the other interested users could confirm? it could be specific to me

steveb8n22:05:04

could also demo if you want to see/capture the behaviour. the advantage of similar timezones shouldn’t be wasted 🙂

cfleming22:05:03

That would be great, thanks.

cfleming22:05:11

I’d like to see that.

steveb8n22:05:36

ok. taking a brekkie break, then open all morning

cfleming22:05:51

Sure, me too - let me know when you’re back.

steveb8n23:05:58

back now but it’s a false alarm. while getting ready to demo, I’ve update to EAP and restarted a few times. now I see stack traces in console

steveb8n23:05:45

must have been IDE in an odd state (or my brain without caffiene)

cfleming23:05:47

I just spent some time staring at the code and couldn’t figure that one out.

cfleming23:05:03

The only think I can think of that might have caused it would be if there were an exception which provoked an assertion failure in clojure.test, rather than provoking an error. I think the logic there might have changed slightly in this EAP.

steveb8n23:05:41

sorry for the confusion. I’ll restrict bug reports till after morning cuppa in future

cfleming23:05:17

No worries. If you do see anything like that let me know, I’m planning to get another build out this afternoon.

nottmey17:05:55

Hi there, where is this information stored and can I store it in the project somehow?

1
Jordan Robinson17:05:19

hey, from my notes, this is at Settings → Languages & Frameworks → Clojure → Symbol Resolution

Jordan Robinson17:05:31

hopefully that hasn't changed in the versions since I wrote those notes

Jordan Robinson17:05:45

I also wanted to store them in the project but couldn't find a way, hopefully someone else knows

nottmey17:05:23

ah found it, there seems to be a way, i’ll check where this info is stored

nottmey17:05:51

(your notes where right, thank you!)

👍 1
Jordan Robinson17:05:10

yeah, I think from memory it stores it with .idea but I was kind of hoping to have it store somewhere in the root so it could be shared with others

Jordan Robinson17:05:45

but like I say this is all from memory so I could be wrong, hope it helped though 🙂

nottmey18:05:35

so that’s how you store it, nice

AJ Jaro18:05:09

I think there is a way to export the data as well

cfleming07:05:04

Yes, various people have come up with scripts to fiddle with that data. I don’t explicitly choose where to store it, it’s just using IntelliJ’s standard config mechanism.

R.A. Porter18:05:33

I use parinfer, but when I paste code, I sometimes need to set structural style to off, paste, then turn back on. I looked to see if there was an option under Copy/Paste Special... to paste as though structural were off, but there was not. Is there a way to do that? If not, I'd request it as a very low-importance feature.

1
johndoe21:05:10

Is it possible to declare somehow a custom resolve form? https://cursive-ide.com/userguide/macros.html Particularly a combination of def+let.

(some-ns/def some-sym 
  [a 0
   b 1
   ...]
  ...
  (+ a b)
  ...)
This snippet wouldn't work if mark some-ns/def as def or let because it's both of them. defn isn't suitable too. I know it's uncommon and rare someone would need this stuff, however I really-really need this.

johndoe06:05:36

Just curious, have I asked some well-known non-issue or is this just how support works with selective ignoring?

cfleming07:05:15

Support is just busy, sorry. There’s no good way to do this currently, sorry. I’m gradually working towards it, but it’s not there yet.

onetom09:05:53

@U44T5FWA3 is some-ns/def defined by your project, or is it a 3rd-party one? if it's yours, then you might want to consider being less tricky with your some-ns/def and just compose it via the built-in clojure.core/def and your custom macro, which then u can set to be resolved as clojure.core/let. eg.:

(def some-sym
  (some-ns/custom-let
    [a 0
     b 1
     ...]
    ...
    (+ a b)
    ...))
it

onetom09:05:38

it's probably a small price to pay, in exchange for having symbol resolution available and hence code navigation and refactoring too.

johndoe22:05:40

All bindings are unresolved but actually are easily resolvable 😞