This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-10
Channels
- # beginners (140)
- # boot (18)
- # cider (4)
- # cljs-dev (28)
- # clojure (191)
- # clojure-greece (51)
- # clojure-russia (1)
- # clojure-spec (13)
- # clojure-uk (2)
- # clojurescript (38)
- # community-development (26)
- # core-logic (16)
- # cursive (6)
- # datomic (3)
- # defnpodcast (9)
- # editors (1)
- # emacs (1)
- # fulcro (10)
- # immutant (3)
- # jobs-discuss (2)
- # leiningen (17)
- # lumo (24)
- # off-topic (30)
- # quil (12)
- # re-frame (11)
- # reagent (103)
- # remote-jobs (2)
- # shadow-cljs (157)
- # spacemacs (4)
- # unrepl (18)
- # yada (2)
Can I connect to shadow-cljs's nREPL with my own code? Since my code is in ClojureScript, while nREPL was built in Java.
bear in mind that the cli-repl is meant for internal use and not officially part of the public API
https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/cljs/npm/client.cljs#L56
you can in theory use the cli-repl thing but that is literally just socket repl without prompt
I was suggested node-nrepl-client last night, tried and it worked, but the message it returned is hard to understand
prepl is coming https://github.com/clojure/clojure/commit/86a158d0e0718f5c93f9f2bb71e26bc794e7d58e
I want to send a piece of Clojure code from my own process, and eval it in the runtime(browser, I mean), what's your suggestion?
I just noticed after using my own editor for so long, I don't even use some basic tool others are using in tools like EMACS.
well if you don't care about the result at all you could just run shadow-cljs cljs-repl your-build
and print all stdout somewhere
only thing I can do at current is generate Clojure code, send it somewhere, maybe print the logs also.
send (shadow.cljs.devtools.cli/from-remote "some-uuid" "another-uuid" ["cljs-repl" "your-build"])
look at this file https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/cljs/npm/client.cljs
unrepl
is newer but not many tools use it (yet). prepl
will be something official but nobody knows when this will get adoption. socket-repl still isn't used by anything and thats has been there since 1.7.
if you give me a clear definition of what you want to do I can take a look at implementing something to make that work
I'm still thinking about if there any way to improve my workflow. I'm the only user, and no one would write plugins for me except myself.
Come join #unrepl, @U3E46Q1DG would be glad to help 🙂
A cursive user told me they were switching to https://github.com/pedestal/pedestal/blob/master/service-tools/src/io/pedestal/service_tools/dev.clj#L23 recently
but cursive has a button for this so I guess the only difference is that I can trigger it when I want to
The cursive user told me they utilized the auto-save on un-focus feature, which surprised me 😂
it is strange though. for clojure I definitely prefer manually requiring/reloading namespaces and doing things via the REPL
took me long while to realize ["cljs-repl" "browser"]
does nothing but connect me to the REPL in browser..
but... when they use nREPL, the code is evaluated in your Clojure process, not in the browser?
Thanks for the help. Going out for some hours. I will try add it in my editor later, and gather feedbacks.
Hi, I have the problem that *target*
is set to default
instead of nodejs
(what I would expect) when the build is configured with :target :node-script
. Can anyone give me a hind here where I am running into?
Yes exactly, before this me neither 😉
You can set :compiler-options {:closure-defines {cljs.core/*target* "nodejs"}}
in your build
Gosh, thanks, I already tried various combinations to get this set via clojure-defines. Now it works.
I think that would be the correct solution.
I've opened an issue: https://github.com/thheller/shadow-cljs/issues/198
Thanks a lot! 👍
by the way @thheller, just to follow up on my sorrows of the past few days: not only was I battling the weird stale state issue, but it turns out that due to a known bug in an old version of nodemon (!!!), my server was restarting without me noticing every time I saved my client code in atom (actually it would restart even when i switched tabs). so the hot code reloading was appearing to break in the most nondeterministic and impossible to debug ways imaginable. talk about bad luck.