Fork me on GitHub
#cursive
<
2016-01-09
>
denik13:01:07

I experience odd caching for cljs in intellij w/ Cursive. Each time I do a lein clean or remove/add a dependency I have to restart the editor for changes to take effect. Does anyone know how to avoid this?

meow13:01:52

@denik: are you refreshing your lein project in cursive when you change dependencies?

denik13:01:51

@meow: yeah I tried that

denik13:01:11

along with all the other load/refresh options accessible throgh cmd + shift + A

meow13:01:20

what I do is hover over the icon on the bottom left corner to get the menu, select lein, hit the blue arrow/circle button

meow13:01:05

I never do cmd + shift + A

meow13:01:15

not sure what that is, let me look

denik13:01:03

“refresh leiningen projects"

denik13:01:19

It’s the same as through cmd + shift + A

denik13:01:31

you don’t experience issues when adding/removing deps

meow13:01:35

can you pull up the lein project display - then you can drill down into it and see what dependencies cursive is pulling in

meow13:01:46

I use a bare minimum project.clj file for cursive and use boot for anything needed beyond that

meow13:01:04

any time I change deps I just refresh the lein project

meow13:01:22

always works fine

meow13:01:43

never have to do lein clean

meow13:01:51

are you doing clj or cljs

meow14:01:03

lately I'm just doing straight clj + nREPL so my setup is simple

sveri16:01:16

@denik: @meow I have a setup with clj / cljs and cljc libs, everything works fine for me when I refresh the leiningen project in intellij. No matter if via CTRL+Shift+A or the leiningen window

denik16:01:24

@sveri so say you add a dep, then you refresh projects and finally restart the REPL and requiring your new dep is no problem?

sveri16:01:13

I dont need to restart the repl for this

sveri16:01:28

I can as well just refresh it and cursive knows about it

sveri16:01:36

the repl and cursive are separate here

meow17:01:42

@denik: did you try drilling down into the dependency tree in the lein window to see if your newly added dependency appears there?

meow17:01:00

it should, and does for me

meow17:01:14

if it doesn't, you've got an issue and someone can help track it down. Maybe a path issue, I don't know. But you need to provide more context. What you are getting is not expected.

sveri17:01:01

There is also the option to invalidate the caches and restart, this helps me most of the time I have weird errors. A few times I had to delete the .IdeaIC15 folder completely in %HOME% to get rid of weird issues. This of course deletes your whole configuration, so be careful with that.

denik17:01:02

@meow yep it's in there. Okay thanks @sveri

cfleming21:01:26

@denik: That should definitely work if you’re using “refresh lein projects"

cfleming21:01:49

Does invalidate caches and restart help? The indexes can occasionally get funky.

denik21:01:17

Restart helps but it's an issue I run into constantly.

denik21:01:19

@cfleming is there a way to set default REPL config for CLJS and CLJ. currently I'm setting the each time a new project is loaded.

cfleming21:01:37

@denik: That’s annoying. If it’s possible, could you create a small repro case which shows the issue in your install (`lein new <whatever>`, add something to project.clj, refresh doesn’t add it) and I’ll try to reproduce it here.

cfleming21:01:49

@denik: Do you mean to set the type of a particular REPL? It should auto-switch when your REPL is converted from CLJ to CLJS - how do you start your CLJS REPLs?

denik21:01:35

With my om projects I run it through Clojure main with a figwheel script

denik21:01:30

Even adding the REPL. So far I've had to add a REPL config to each project though they all use the same settings

cfleming21:01:49

Ah, right - I’m planning to fix that one next week.

cfleming21:01:20

New lein projects will get a default REPL run config added by default.

denik21:01:27

Ok thanks