Fork me on GitHub
#cursive
<
2016-08-25
>
cfleming00:08:58

Right, I have plans to improve the interop there - things like marking type hints when they’re not required, for example.

cfleming00:08:14

And quickfixes to add them either at the point of use or definition.

cfleming00:08:01

@danielcompton One problem with that issue (I’ll comment over there) is that CLJS currently has no inference at all.

cfleming00:08:46

Because there there are no type hints etc - it would require a global algorithm. I have plans to investigate whether some of the JS type inference algorithms would work well (e.g. Tern)

danielcompton00:08:31

That could be good, as it looks like they support JSDoc

danielcompton00:08:44

which is used throught Closure, and is being added to CLJS

cfleming00:08:16

Yes, it does.

potetm02:08:50

@cfleming Yeah I noticed the feature. And it worked fine up until today. But now I get a NPE every single time I click the button.

potetm02:08:03

And I can't get the banner to go away, which is pretty distracting.

cfleming02:08:11

Can you send a copy of the NPE?

potetm02:08:44

private message, github, or here?

cfleming02:08:02

There is one problem where even if the stubs are generated, sometimes IntelliJ doesn’t pick them up. Closing and re-opening the project seems to work for that case.

cfleming02:08:16

Here is fine if it doesn’t contain anything sensitive.

potetm02:08:22

null
java.lang.NullPointerException
	at java.io.File.<init>(File.java:317)
	at cursive.stubs$cljs_namespaces_form$fn__12313.invoke(stubs.clj:145)
	at clojure.core$map$fn__4553.invoke(core.clj:2624)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.RT.seq(RT.java:507)
	at clojure.core$seq__4128.invoke(core.clj:137)
	at clojure.core$concat$cat__4217$fn__4218.invoke(core.clj:700)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:56)
	at clojure.lang.Cons.next(Cons.java:39)
	at clojure.lang.RT.next(RT.java:674)
	at clojure.core$next__4112.invoke(core.clj:64)
	at clojure.core$nthnext.invoke(core.clj:3038)
	at clojure.core$print_sequential.invoke(core_print.clj:58)
	at clojure.core$fn__5839.invoke(core_print.clj:155)
	at clojure.lang.MultiFn.invoke(MultiFn.java:233)
	at clojure.core$pr_on.invoke(core.clj:3548)
	at clojure.core$print_sequential.invoke(core_print.clj:59)
	at clojure.core$fn__5839.invoke(core_print.clj:155)
	at clojure.lang.MultiFn.invoke(MultiFn.java:233)
	at clojure.core$pr_on.invoke(core.clj:3548)
	at clojure.core$pr.invoke(core.clj:3560)
	at clojure.lang.AFn.applyToHelper(AFn.java:154)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.core$apply.invoke(core.clj:630)
	at clojure.core$pr_str.doInvoke(core.clj:4563)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at cursive.stubs$cljs_namespaces_form.invoke(stubs.clj:123)
	at cursive.stubs$generate_stubs$fn__12326$process__12327.invoke(stubs.clj:247)
	at cursive.stubs$generate_stubs$fn__12326.invoke(stubs.clj:281)
	at cursive.task$backgroundable$reify__12256.run(task.clj:12)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:170)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:494)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:155)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:128)
	at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:308)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

potetm02:08:36

that was bigger than expected

potetm02:08:32

I'm remembering that initially I had to work around a js dep that was brought in manually. But that was a different error that I was able to track down myself.

cfleming02:08:42

@potetm: To answer your question on Twitter - it’s not just IntelliJ dev 🙂

cfleming02:08:06

Although that probably makes it worse.

potetm02:08:10

ah yeah, I almost forgot about that 🙂

potetm02:08:26

ironic really

cfleming02:08:22

Yeah, no doubt.

potetm02:08:46

Okay, I think I actually figured this particular issue out. We recently moved our cljs deps into a lein profile, and that profile wasn't included under "Leiningen Projects -> Profiles".

cfleming02:08:57

Ok, I think I see the problem. I’ll fix it and PM you a dev build you can test. It’ll be in a bit, I’m right in the middle of something.

cfleming02:08:26

Oh, ok. That might explain it, I’m not sure. However I can patch that NPE anyway in case of future misconfigurations.

cfleming02:08:37

Are you using Om or Om-tools?

potetm02:08:52

That's the next problem.

cfleming02:08:14

Actually, let me check - I’m not sure this code obeys the lein profiles yet.

cfleming02:08:50

I’m not sure where you’d specify them - I guess it should use the ones selected in the project view.

cfleming02:08:53

I’ll fix that too.

cfleming02:08:27

I’ll try to get you a dev build today sometime (my time, probably tomorrow for you)

potetm02:08:40

Yeah that was my expectation. It did change the behavior, but it is indeed still hitting problems.

potetm02:08:52

Cool. No worries.

cfleming02:08:47

@potetm: BTW are you planning on going to the conj this year?

cfleming02:08:27

It’s a bit closer for you guys this year, I guess.

potetm02:08:29

@cfleming I was just rolling that around. I'm really considering submitting a talk, though I'm not 100% on which topic I would go for.

potetm02:08:02

Probably about the same really. Nashville is pretty far from Texas. Texas is a bigass state.

cfleming02:08:20

Oh, cool. I believe there’s a channel here for talk feedback.

cfleming02:08:35

Yeah, it actually does look pretty far now that I look on the map.

cfleming02:08:40

Yeah, I’m hoping to be there.

cfleming02:08:48

Hope to see you there again!

curlyfry11:08:15

Does cursive ignore some top forms when executing "Load file in REPL"? I don't get any output for (+ 1 1) as a top form in my file for example (Pretty cool if this is the case, I usually wrap my testing top form stuff in comment)

verma15:08:12

hmm, it should eval them 😕

verma15:08:38

I see the same behavior though 😕

rauh17:08:25

Cursive hangs right after startup. Had to invalidate the caches again for it to work. 😕 Stacktrace: https://gist.github.com/rauhs/4b65b876af05ea60a1d9b96c10007c57 If I remove <component name="FileEditorManager"> from workspace.xml it seems to work. So some problems with my split window layout and/or caret position/selection, maybe?

bfabry17:08:05

has anyone seen an issue with thousands of the error: ClassCastException: cursive.psi.impl.ClVectorImpl cannot be cast to clojure.lang.Named

bfabry17:08:25

seems to show up when I def a proxy object

yiinho22:08:11

Anyone experiencing IDEA hanging on startup after updating Cursive to the latest version?

yiinho22:08:38

looks like it hangs right after starting REPL

Paco23:08:19

happened to me recently

Paco23:08:37

some project specific settings caused the problem

Paco23:08:53

you need to rule that out 😛

Paco23:08:25

I mean, it is definitely a but on cursive but it was specific to my project 😛

yiinho23:08:30

I see. I've configured IDEA to open up project loading screen, not opening project directly

yiinho23:08:48

still happening to me. will any project specific settings still affect IDEA startup?

Paco23:08:19

only if idea is trying to load the project by default

Paco23:08:42

it seems to be the default for me

kenny23:08:14

Is there a way to make Cursive use a local deps.cljs file to auto-complete for Clojurescript?