Fork me on GitHub
#cursive
<
2015-08-28
>
andrewhr01:08:29

@cfleming: out of curiosity: eval top form understands that comment forms must be ignored. It's a edge case done by Cursive? Feels so natural!

cfleming07:08:40

@andrewhr: Yeah, I implemented that

rauh13:08:13

My module settings about which dir is a source/test/resource dir is reset every time I start Cursive

cfleming13:08:31

@rauh: Are you using lein?

cfleming13:08:48

You’ll need to configure them in your project.clj

rauh13:08:13

Oh 😞, is there a way to just set it separately?

rauh13:08:29

I have all my leiningen settings in profiles

cfleming13:08:51

No, I’m afraid not. The IntelliJ Maven plugin works the same way. The idea is that a module built from an external model should be totally defined in that model.

cfleming13:08:08

Why do you not want to add things like :source-paths?

rauh13:08:02

Because then my classpath is all wrong

rauh13:08:11

Since I'm using both, CLJS + CLJ in my project

rauh13:08:52

But I'll just specify them all and then overwrite them somehow. Though now my fighwheel startup script has all the clojure source files in its classpath

cfleming14:08:24

Ugh, I really need to fix that.

cfleming14:08:01

Can’t you add the :source-paths to your profiles too? Which classpath is wrong - the one generated by Cursive?

rauh14:08:29

Yeah a leiningen profile can either (recursively) merge or replace any config key

rauh14:08:02

I guess it's not a big deal since I have to require-macros any .clj files in clojurescript anyways

rauh14:08:48

Though, editing the project structure and editing it does rewrite the .iml file and it then gets reset after restarting cursive. I'm not sure if you're in charge of that dialog or if it's IntelliJ but I'd suggest a big warning that editing them will not persist

cfleming14:08:52

Good idea, I’ll see if I can implement that - the Maven plugin may have something I can steal. It’s tricky since that file can be modified in many ways but I can probably generically listen to changes to it.

rauh14:08:19

Also, I notice dev-resource and resources directory is in the "source" category instead of the "resource" category

rauh14:08:48

Now I have another problem: Cursive can't resolve anything out of clojure.core like ns or defn. Though sending it to the repl works fine, how did I mess that up?

cfleming14:08:30

Do you have a Clojure jar in your external dependencies list in the project view?

rauh14:08:47

Hold on, no

rauh14:08:51

I def. have one in my :dependencies vector (under "no profile")

cfleming14:08:02

Ok, so somehow the dependency isn’t getting picked up.

cfleming14:08:12

If you manually refresh does that fix it?

cfleming14:08:24

In the lein project window?

cfleming14:08:51

I can’t think of anything that Cursive would do to prevent that - it just calls out to lein for that functionality

rauh14:08:13

I added it manually (from the libraries) but it's gone after a restart

rauh14:08:22

all other libraries are there. Strange

cfleming14:08:00

Yeah, the libs are rewritten to - again, the idea is that they should be configured in project.clj.

cfleming14:08:10

Are you able to share your project.clj?

cfleming14:08:17

Or send it to me privately?

rauh14:08:33

I'll do some more digging, then I can share it yes

cfleming14:08:33

BTW, WRT the resources thing, I can’t remember what the issue was there, but they have to be source folders in IntelliJ, because its semantics for resource folders are different to lein’s, and weirdness ensued.

cfleming14:08:06

Ok. Send it to me at <mailto:[email protected]|[email protected]> and I’ll take a look at it and see if I can reproduce the problems you’re seeing.

rauh14:08:37

Looks like having ANY :exclusions causes this for me. Making it [] and it's clojure is in there

rauh14:08:50

AND having a checkouts directory

rauh14:08:23

Without checkouts or without :exclusions it works. Strange

cfleming14:08:21

That is really strange.

rauh14:08:42

Can you reproduce?

cfleming14:08:13

I haven’t tried - I’m in the middle of something, I’ll try it in a bit.

rauh14:08:56

Ok no rush, FWIW I have (only) prismatic/schema git clone'd in the ./checkouts/

cfleming14:08:21

You have it cloned rather than symlinked?

rauh14:08:26

then include :dependenciese [... [prismatic/schema "1.0.0-SNAPSHOT"] ..]

rauh14:08:36

yeah, do I have to symlink it?

cfleming14:08:45

Ok - and where do you put the exclusion?

rauh14:08:04

In my project.clj.

cfleming14:08:07

Checkouts were designed to be symlinked IIRC, but I have no idea if copying it there breaks things.

cfleming14:08:26

Right, but what is the exclusion you’re adding?

rauh14:08:38

oh, it's instaparse

rauh14:08:55

but I can add anything and it will break

cfleming14:08:11

So in instaparse, you’re excluding Clojure?

rauh14:08:25

tried tools.reader and tools.nrepl

cfleming14:08:32

Can you paste the dependency with the exclusion you’re using, and I’ll try that.

rauh14:08:57

Symlinking it doesn't fix it 😞

meow21:08:01

@cfleming: if I type letfn followed by a tab I get this autocomplete text:

(letfn [(name) [args]
            )])

meow21:08:25

Which is wrong - the extra right paren after name

meow21:08:16

Or I'm doing something wrong. simple_smile