This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-28
Channels
- # beginners (226)
- # boot (18)
- # bristol-clojurians (4)
- # cider (1)
- # clara (77)
- # cljs-dev (79)
- # cljsjs (27)
- # clojure (178)
- # clojure-austin (9)
- # clojure-dev (30)
- # clojure-gamedev (11)
- # clojure-italy (5)
- # clojure-losangeles (3)
- # clojure-poland (1)
- # clojure-spec (42)
- # clojure-uk (34)
- # clojurescript (182)
- # core-async (5)
- # core-logic (2)
- # cursive (17)
- # datascript (12)
- # datomic (33)
- # emacs (8)
- # figwheel (1)
- # fulcro (25)
- # jobs (6)
- # jobs-discuss (27)
- # lein-figwheel (1)
- # lumo (18)
- # off-topic (17)
- # onyx (5)
- # pedestal (7)
- # re-frame (30)
- # reagent (52)
- # remote-jobs (1)
- # ring (2)
- # ring-swagger (1)
- # shadow-cljs (40)
- # spacemacs (5)
- # sql (31)
- # unrepl (12)
- # vim (25)
Rolled back to the version of shadow-cljs.edn
that was working before, still getting the same behavior.
Getting weirder - running lein clean
fixed the version without lein.
@dave.dixon socket connect failed, server process dead?
means that the server was most likely killed forcefully so the server didn't clean up after itself. can you verify that the server is actually dead? ie. no running java process left?
the script uses those files to decide whether it should start a new server or connect to old one
@lilactown re-use server? all commands works identically with or without lein
or set :cache-root ".shadow-cljs"
in your config so lein clean
doesn't mess with the server state
@hlolli not sure if i understand correctly but we run shadow-cljs like this:
(defn start-cljs-repl []
(shadow-server/start!)
(shadow/watch :app)
(shadow/watch :test)
(shadow/watch :devcards)
(shadow/nrepl-select :app))
and then we can just do cider-jack-in-clojurescript
We also have a .dir-locals.el
which contains:
((nil . ((projectile-project-type . lein-test)
(eval . (progn
(require 'cider)
(setq projectile-create-missing-test-files t)
(setq cider-cljs-lein-repl "(start-cljs-repl)"))))))
So we can set the correct command to start he cljs-repl@mitchelkuijpers I think the issue is that you can't yet do this with node-repl
Ah ok nvm then
very neat! @mitchelkuijpers I'm stealing that for my non-node projects 🙂
I just pushed 2.2.0
. bumped to 2.2 because I changed the default cache directory. it is now .shadow-cljs
instead of target/shadow-cljs
. too many conflicts with lein
cleaning the target
directory. you can configure the old directory by setting :cache-root "target/shadow-cljs"
in your config.
also added shadow-cljs browser-repl
(or (shadow.cljs.devtools.api/browser-repl)
for a simple browser REPL without a build config
Tried updating to 2.2.0, still getting the issue where it immediately exits. Looking at the code it wasn't clear what would happen if cp/spawnSync
failed before the process got started, i.e. if an error would be displayed. It seems like this is always failing for me, independent of lein, since it also failed to run an npm command it said it was executing.
Tried it as well. Now getting “cannot call a class as a function” error on an npm require. After a lein clean
and downgrade back to 2.1.26
, the issue disappears.
@levitanong your error is most likely related to https://github.com/google/closure-compiler/issues/2822
it should work if you add [com.google.javascript/closure-compiler-unshaded "v20180101"]
to your dependencies
@dave.dixon just calling lein with-profile dev run -m shadow.cljs.devtools.cli --npm watch app
directly also fails without any error?
No, directly calling the printed command works.
I'm noticing, no matter how I kill shadow-cljs process within emacs the file nrepl.port isn't always deleted causing shadow-cljs - socket connect failed, server process dead?
, I wonder if it's sending some kill signal that isn't handled by shadow-cljs?
Windows 10, node 8.9.4
I've tried two things
(process-send-string (get-process "shadow-cljs") ":repl/quit\n")
and
(kill-process "shadow-cljs")
it kills the process for sure, it may be sending some SIGTERM or SIGINIT, I wonder which or something else...
hmmm, I actually look for java, I wonder if my gnome-system-moniter isn't showing it, due to being nested within emacs...
but node should be able to listen to SIGTERM signals, so you can add some java process kill callbacks
@dave.dixon just reproduced the problem on my machine. I only ever started it via WSL bash so I never noticed it before
@dave.dixon it seems to work with [email protected]
@thheller Had some weird problem getting node to update shadow-cljs, but once I got past that it worked. Thanks for the quick fix.