inf-clojure

GitHub: https://github.com/clojure-emacs/inf-clojure Discord (official chat): https://discord.gg/nFPpynQPME
pre 2018-03-21T00:02:12.000340Z

looks like u need cljs on classpath ...

richiardiandrea 2018-03-21T00:02:13.000199Z

actually, the new socket REPLs won't require any additional step

richiardiandrea 2018-03-21T00:02:21.000064Z

yes but you need that anyways

pre 2018-03-21T00:07:07.000015Z

i added org.clojure/clojurescript in deps.edn and I can see it downloaded with clj -Spath, the above command throws filenotfound .... could not localte cljs/main__init.classs ...

pre 2018-03-21T00:07:55.000281Z

sorry, I know this isn't directly inf-clojure's question but my hope is to switch to it with the default clojure tools and lumo ...

richiardiandrea 2018-03-21T00:08:15.000224Z

@pri are you on 1.10.217?

pre 2018-03-21T00:08:39.000192Z

aha ... 1.9.946 .. let me update

pre 2018-03-21T00:10:11.000042Z

I like deps.edn, one of the reasons I'm looking fwd to switching to it from lein

richiardiandrea 2018-03-21T00:10:20.000256Z

agree

pre 2018-03-21T00:11:01.000098Z

four years ago I used to have a bash file that generated classpath and ran clojure projects instantly with an embedded nrepl \:)

richiardiandrea 2018-03-21T00:12:37.000299Z

true that 😄

pre 2018-03-21T00:17:05.000045Z

added the new cljs version, and ran clojure -m cljs.main and it opens a browser window at 9000; no repl, and I can't connect to it via inf-clojure-connect.

richiardiandrea 2018-03-21T00:17:15.000254Z

the command above is longer 😄

richiardiandrea 2018-03-21T00:17:25.000004Z

ah wait

richiardiandrea 2018-03-21T00:17:32.000156Z

yes for that you need the socket repl

pre 2018-03-21T00:18:00.000157Z

so start cljs.main and socket repl?

richiardiandrea 2018-03-21T00:18:05.000148Z

just a sec

richiardiandrea 2018-03-21T00:19:12.000007Z

clojure -J-Dclojure.server.repl="{:port 5044 :accept cljs.server.node/repl :args [{:opts $(cat cljsc_opts.edn)}]}" -m cljs.main -re node

richiardiandrea 2018-03-21T00:19:38.000284Z

the args are necessary for the passing the npm-deps stuff to the socket REPL thread

richiardiandrea 2018-03-21T00:20:00.000234Z

the above drops you directly in a cljs REPL

pre 2018-03-21T00:27:55.000170Z

wow, could you also paste a sample cljs_opts.edn?

richiardiandrea 2018-03-21T00:33:12.000174Z

{:main cli-repro.core
 :verbose true
 :optimizations :none
 :target :nodejs
 :install-deps true
 :npm-deps {:left-pad "1.1.3"}}

pre 2018-03-21T00:38:27.000089Z

Now I get a different error msg: "Unable to resolve symbol: PrintWriterr-on in this context .... cljs/core/server.clj ...

richiardiandrea 2018-03-21T00:48:05.000104Z

ah yes you need clojure latest @pri

pre 2018-03-21T00:48:31.000158Z

1.10-beta?

pre 2018-03-21T00:52:04.000158Z

I'm using 1.9.0

pre 2018-03-21T01:08:57.000092Z

Ok, I give up on clojure/cljs/socket-repl setup; On a sad note, I just ran the same lumo socket repl commands and clojure socket repl commands and it seems like cider can't connect to socket repls due to nrepl limitations ... sigh.

richiardiandrea 2018-03-21T01:13:12.000011Z

yeah cider does not connect

richiardiandrea 2018-03-21T01:13:29.000087Z

and yes you need 1.10.0-alpha4 or something

pre 2018-03-21T01:30:35.000117Z

Thanks for all your help @richiardiandrea

1👍
bozhidar 2018-03-21T08:42:31.000063Z

> Ok, I give up on clojure/cljs/socket-repl setup; On a sad note, I just ran the same lumo socket repl commands and clojure socket repl commands and it seems like cider can’t connect to socket repls due to nrepl limitations ... sigh.

bozhidar 2018-03-21T08:42:51.000101Z

@pri It’s not nREPL limitations - it’s just a completely different protocol. 🙂

bozhidar 2018-03-21T08:43:38.000357Z

It’s on CIDER’s roadmap to eventually support the socket repl protocol as well, but I can’t promise when this is going to happen.