Fork me on GitHub
#cursive
<
2018-12-12
>
jeremys13:12:08

@cfleming Hey Colin, I removed the target directory, the .cp directory and the project.clj that I had previously renamed project.clj.back don’t ask why... It seems to work fine now. My guess would be that some artifacts generated previously using lein might have messed things up a bit. I don’t know if that make sense though. Still it works! Thanks.

sashton16:12:44

Feature request (or, is this already possible?): - click on a test assertion failure (yellow “!” icon) - assertion diff window pops up (now for the feature request) - if the same test is re-run, and a new diff is produced, update the existing diff viewer with the new results, so the user doesn’t have to navigate back to the file and click the icon again

nikola21:12:30

hello there

nikola21:12:58

my non-commercial license expired, why can't I renew it, or am I missing something?

cfleming22:12:46

@nikola.kasev For the non-commercial licence, just grab a new one.

nikola22:12:51

oke, thanks

cfleming22:12:26

BTW @alexmiller, following on somewhat from the discussion in #clojure, I remember you have mentioned a couple of times that you don’t like how Cursive presents exceptions, but I can’t remember the details. What would you like to see there?

Alex Miller (Clojure team)22:12:20

The number one thing is that Cursive shows only the top exception in the chain, whereas 100% of the time I want the root cause, so I find the default behavior to completely hide the useful info

Alex Miller (Clojure team)22:12:10

Now with 1.10, I’d love to see all the work we did on messages and ex-data get used

cfleming23:12:33

Right, at the moment it just uses printStackTrace on *e. I’ll look at fixing that, and I’ll look at what I can do in 1.10 too.

cfleming23:12:24

Oh nice, I hadn’t seen that - thank you!

kenny23:12:48

I have a namespace compute.alerts.test-utils located in my test directory. I have a dev.play in my siderail directory. If the dev.play ns looks like this:

(ns dev.play
  (:require
    [compute.alerts.test-utils :as test]))

(test/|)
with my cursor where the | is, I do not get any auto complete -- it says "No suggestions". There are definitely public functions in compute.alerts.test-utils. I have tried File > Invalidate caches & restart, which does not help. Any ideas?

kenny23:12:24

Auto complete works for namespaces in my src directory.

cfleming23:12:33

@kenny I can’t think of anything immediately, no. Both test and siderail are marked as source roots?

kenny23:12:44

I also tried creating another namespace in the test directory and it doesn't auto complete either.

cfleming23:12:36

Are they marked as a source or test root? i.e. blue or green in the project view?

kenny23:12:51

test is test root. siderail is source root.

cfleming23:12:10

You’re using deps, right?

cfleming23:12:21

Ok, I’ll try to reproduce that.

kenny23:12:41

I get auto complete from namespaces in the siderail directory too.

cfleming23:12:49

Actually, isn’t it expected that you can’t access test sources from source root files?

kenny23:12:06

Why? They are all on the classpath.

cfleming23:12:09

i.e. it’s essentially production code depending on test code.

kenny23:12:18

Except siderail isn't.

cfleming23:12:31

Isn’t it marked as a source root?

kenny23:12:45

Yes but it's under dev alias.

cfleming23:12:10

Hmm, it’s possible there’s some assumption about that baked into Cursive, I’ll take a look.

cfleming23:12:50

Actually, that may even be baked into IntelliJ, now that I think about it - it’s been a while.

kenny23:12:32

Hmm. That distinction seems confusing. In my mind things are either on the classpath or they aren't. If they're on the classpath, I'd expect auto complete to work.

kenny23:12:59

I added test2 to my :test :extra-paths and I get auto complete from compute.alerts.test-utils. Sounds like your guess along the right lines.

cfleming23:12:30

Ok, I’ll take a look. Often these things are more fluid in Clojure than e.g. in Java.

cfleming23:12:03

But from Cursive’s point of view, once something is marked as a source root it has no way of knowing if it was marked as such in dev

kenny23:12:24

That seems ok. It sounds like the problem is you do not get auto complete from namespaces defined in a test root when working in a sources root.

cfleming23:12:36

Yes, I think that should be allowed, perhaps with an inspection to warn that you’re doing that (since it might be unexpected).

kenny23:12:52

Perhaps. FWIW my use case is I have some test utilities defined in my tests root that I'd like to use in a namespace to experiment.