Fork me on GitHub
#cursive
<
2017-12-28
>
briantrice19:12:25

Q: I have a dependency prone whose jar contains generated JS that includes things like goog.object. In Cursive, this means that goog.object gets indexed twice, so function lookup requires a menu indirection for anything in core. This happened before with cljs-time which contains an entire copy of clojurescript for running tests, so I excluded it (inconvenient). Is there a better solution?

briantrice19:12:11

Trying something out with the Dependency Viewer, which I’d not properly apprehended before.

briantrice19:12:11

No, I don’t think that its “Remove From Scope” action does what I suspected.

timgilbert20:12:24

Say, is there any way to see my exception stack traces in the Cursive repl?

cfleming21:12:09

@timgilbert Yes, when you receive an error there’s a button in the REPL menu bar, or you can bind the action to a key.

cfleming21:12:30

@briantrice I’ll have to sit down and look at that, I’m not sure off the top of my head.

timgilbert21:12:38

Oh! Duh, should have noticed that. Thanks!

briantrice21:12:44

@cfleming I tried using the result of “copy path” from the jar’s contents, as well as naming the directory segment, into project exclusions, but it didn’t help. Right now it seems like dependency indexing happens per-JAR.

cfleming21:12:07

Yes, that’s right. I’m not sure whether it will be possible to control that.

cfleming21:12:04

Wow, that is crazy. I won’t be doing that 🙂

briantrice21:12:10

yeah… hard to maintain

briantrice21:12:41

I mean, I’m tempted to just clone and maintain branches of each offending library that omits the directory before packaging at this point, just so I can get F1 to call up cljs core signatures…

briantrice21:12:30

oh… IntelliJ thinks these are production classes. hmmm

briantrice21:12:40

or. library classes.

briantrice21:12:30

maybe I can make a special scope with the exclusions and use that to avoid indexing?

potetm22:12:55

omg. Am I reading this right? People are publishing jars w/ their deps packaged in them?

cfleming22:12:12

It does seem like something that might be a bug in the downstream lib.

cfleming22:12:34

But I’d need to look more closely at what they’re doing to be sure.

potetm22:12:58

Yeah on its face I would certainly call that an out-and-out bug.

potetm22:12:07

True. Perhaps there’s something I’m not understanding.

briantrice22:12:46

yeah, I’ll file with the maintainer if I can express the problem right

briantrice22:12:03

especially if I can fix it with a PR

potetm22:12:27

fwiw I’m not seeing any of that in cljs-time-0.5.2.jar

potetm22:12:56

just the proper lib+jar files

briantrice22:12:07

just bumped from 0.5.0 to 0.5.2 in case it shakes that out…

briantrice22:12:25

strangely enough, now cljs-time doesn’t have the test directory with clojurescript’s source in it. but prone still has the generated js. I’ll poke further, thank you.

potetm22:12:05

np! good luck!

briantrice22:12:31

ok, so generally it seems like when this happens, it’s fixable by using the “delete” option in the Project > Libraries panel, and then rebuilding while IntelliJ is closed (or invalidating caches)

briantrice22:12:07

I’m not sure how dependencies get compiled that way, but will try to keep an eye on the issue if it re-occurs.