Fork me on GitHub
#cljsrn
<
2020-08-22
>
risto20:08:15

Hey everyone, Has anyone here set up Cider with Krell? I found the instructions https://github.com/vouch-opensource/krell/wiki/Tooling-Integration---Emacs%2C-Cursive%2C-VSCode-etc.#nrepl-emacs-etc but I'm not sure how to get it to work I found https://increasinglyfunctional.com/2020/05/07/clojurescript-react-native-krell-emacs.html blog post, but I'm also an emacs noob too 😓 It doesn't seem to read the directory variables afaict

dotemacs20:08:01

It’s my fault. The code for this is part of Cider. But I didn’t write the documentation. Can you bug me tomorrow to do it?

risto20:08:24

ah yeah sure

👍 3
risto16:08:05

Hey, are you around today?

risto16:08:20

I tried to get this working but it just spits out error in process sentinel:

error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Error building classpath. Unable to compare versions for org.clojure/clojurescript: {:mvn/version "1.8.51", :deps/manifest :mvn} and {:git/url "", :sha "00079768f9104b17f4130cd710a2f636e046cb07", :deps/manifest :deps, :deps/root "/home/risto/.gitlibs/libs/org.clojure/clojurescript/00079768f9104b17f4130cd710a2f636e046cb07"}

dotemacs16:08:29

I will be in 20-ish min

risto18:08:18

you mentioned it's part of cider -- is it just a simple command that needs to be run?

risto18:08:36

or are there some other steps to change the config

dotemacs18:08:47

Sorry, I’m here now, one sec

dotemacs18:08:42

So let’s start from the scratch, what version of Cider are you on?

dotemacs18:08:05

If you run M-x cider-version in Emacs, what is returned?

dotemacs18:08:19

That’s good, Krell support is in that release

dotemacs18:08:14

What steps exactly do you do in order to get that error above ?

dotemacs18:08:38

Can you create a sample repo and put it somewhere publicly?

risto18:08:50

I'm running

M-x cider-jack-in-cljs
if I run the command from the tutorial to start the repl from the command line it works:
clj -m krell.main -co build.edn -c -r

risto18:08:58

yeah sure

dotemacs19:08:56

Got it, looking …

dotemacs19:08:47

piggieback was pulling in an older version of ClojureScript. The issue came up even earlier and it isn’t Krell specific, see: https://clojurians-log.clojureverse.org/cljsrn/2020-06-03 The fix, just add: org.clojure/clojurescript {:mvn/version "1.10.773"} to your deps.edn. And M-x cider-jack-in-cljs, when prompted type krell or add this in the root of your repo: ((nil . ((cider-default-cljs-repl . krell)))) in .dir-locals.el.

risto19:08:41

ah nice! thanks so much 🙂

risto19:08:23

I got an error when i ran npm start about react being missing, but it still works:

risto19:08:24

Waiting for device connection on port 5001
Exception in thread "Thread-17" clojure.lang.ExceptionInfo: null {:clojure.error/source nil, :clojure.error/line nil, :clojure.error/column nil, :clojure.error/phase :compilation}
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4260)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:4246)
	at cljs.analyzer$analyze_file$fn__2894.invoke(analyzer.cljc:4764)
	at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:4759)
	at cljs.analyzer$analyze_file.invoke(analyzer.cljc:4717)
	at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:4781)
	at cljs.analyzer$analyze_file.invoke(analyzer.cljc:4717)
	at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:4731)
	at cljs.analyzer$analyze_file.invoke(analyzer.cljc:4717)
	at cljs.analyzer$analyze_deps.invokeStatic(analyzer.cljc:2634)
	at cljs.analyzer$analyze_deps.invoke(analyzer.cljc:2605)
	at cljs.analyzer$ns_side_effects.invokeStatic(analyzer.cljc:4122)
	at cljs.analyzer$ns_side_effects.invoke(analyzer.cljc:4117)
	at cljs.analyzer$analyze_STAR_$fn__2772.invoke(analyzer.cljc:4244)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:343)
	at clojure.core$reduce.invokeStatic(core.clj:6827)
	at clojure.core$reduce.invoke(core.clj:6810)
	at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:4244)
	at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:4235)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4263)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:4246)
	at cljs.analyzer$analyze_file$fn__2894.invoke(analyzer.cljc:4764)
	at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:4759)
	at cljs.analyzer$analyze_file.invoke(analyzer.cljc:4717)
	at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:4781)
	at cljs.analyzer$analyze_file.invoke(analyzer.cljc:4717)
	at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:4731)
	at cljs.analyzer$analyze_file.invoke(analyzer.cljc:4717)
	at cljs.analyzer$analyze_file.invokeStatic(analyzer.cljc:4727)
	at cljs.analyzer$analyze_file.invoke(analyzer.cljc:4717)
	at cljs.repl$repl_STAR_$fn__6924$fn__6925$fn__6928.invoke(repl.cljc:1180)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:665)
	at clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1973)
	at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1973)
	at clojure.lang.RestFn.invoke(RestFn.java:425)
	at clojure.lang.AFn.applyToHelper(AFn.java:156)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.core$apply.invokeStatic(core.clj:669)
	at clojure.core$bound_fn_STAR_$fn__5749.doInvoke(core.clj:2003)
	at clojure.lang.RestFn.invoke(RestFn.java:397)
	at clojure.lang.AFn.run(AFn.java:22)
	at java.lang.Thread.run(Thread.java:748)
Caused by: clojure.lang.ExceptionInfo: No such namespace: react, could not locate react.cljs, react.cljc, or JavaScript source providing "react" in file file:/home/risto/.m2/repository/reagent/reagent/0.10.0/reagent-0.10.0.jar!/reagent/core.cljs {:tag :cljs/analysis-error}
	at cljs.analyzer$error.invokeStatic(analyzer.cljc:762)
	at cljs.analyzer$error.invoke(analyzer.cljc:758)
	at cljs.analyzer$error.invokeStatic(analyzer.cljc:760)
	at cljs.analyzer$error.invoke(analyzer.cljc:758)
	at cljs.analyzer$analyze_deps.invokeStatic(analyzer.cljc:2636)
	at cljs.analyzer$analyze_deps.invoke(analyzer.cljc:2605)
	at cljs.analyzer$ns_side_effects.invokeStatic(analyzer.cljc:4122)
	at cljs.analyzer$ns_side_effects.invoke(analyzer.cljc:4117)
	at cljs.analyzer$analyze_STAR_$fn__2772.invoke(analyzer.cljc:4244)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:343)
	at clojure.core$reduce.invokeStatic(core.clj:6827)
	at clojure.core$reduce.invoke(core.clj:6810)
	at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:4244)
	at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:4235)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4263)
	... 43 more
To quit, type: :cljs/quit
nil
user> 
cljs.user> 

risto19:08:21

does react just need to be added to deps.edn to get rid of that error?