Fork me on GitHub
#cursive
<
2015-11-27
>
jori09:11:37

Hi, Cursive is unable to resolve core stuff like defn-, let... referenced from cljs and cljc any hints on what to do?

jori09:11:48

Stuff that resolves: defn, ns, identical?, some?, reset!...

jori09:11:51

Stuff that does not resolve: defn-, let, declare, when, cond, defmulti...

jori09:11:23

I have the latest Cursive (0.1.71), clojurescript 1.7.170, clojure 1.7

cfleming09:11:02

@jori: You’ve tried invalidating the caches?

cfleming09:11:18

Ok, if you open Project Structure (Cmd-; on OSX), open your module and look at its dependencies

cfleming09:11:41

Does it have both Clojure and ClojureScript added as dependencies?

jori09:11:58

only clojurescript actually

jori09:11:44

no, actually, it's there

cfleming09:11:55

Ok, and the versions look like you’re expecting?

jori09:11:57

yes the versions are correct

cfleming09:11:21

The resolution fails from cljs as well right, not just cljc?

jori09:11:29

there are multiple versions (older ones grayed out)

cfleming09:11:40

That’s not good

cfleming09:11:52

Select the older ones and remove them, and see if that helps

cfleming09:11:12

Perhaps the new lein integration is not correctly removing old versions.

jori09:11:41

Ok, I removed all old clojure and clojurescript jars, and invalidated caches

jori09:11:47

same situation still

jori09:11:51

did not fix it.

jori09:11:05

I'll try removing all the greyed out jars

cfleming09:11:15

Has this just started happening on a project that has previously worked?

jori09:11:30

yes, this is new

jori09:11:17

I would guess that it started inside the last few weeks.

jori09:11:54

(I've been working mostly clj side lately, so I can't pin it to an exact cursive upgrade)

cfleming09:11:46

Does your project have multiple modules? Does it happen in all of them?

jori09:11:04

just one module

jori09:11:44

My colleague on the same codebase and has the same issue, and he has also upgraded to the latest cursive version a few weeks ago.

cfleming09:11:39

Ok, so if you’re both seeing the same thing then it’s not some temporary thing like corrupt indexes.

cfleming09:11:23

I guess this is not an open source project, right?

jori09:11:10

yeah, not an open source project

jori09:11:51

I added a new cljc file lately, that is referenced from both clj and cljs... might that cause some confusion?

cfleming09:11:22

Can you DM me a screenshot of your Project Structure view, with the Modules tab open and the Dependencies tab within that?

cfleming09:11:48

Maybe, the cljc support is still a little flakey, but it shouldn’t affect files other than cljc I think.

danielgrosse10:11:28

Is there a way, to create cljs files when creating a new namespace?

cfleming11:11:26

@danielgrosse: Yes, when you use the “New namespace” dialog, there’s a dropdown to select the type of file.

cfleming11:11:42

You can use the up/down arrow keys to switch it without using the mouse.