This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-12
Channels
- # aleph (1)
- # aws (2)
- # babashka (44)
- # beginners (178)
- # biff (12)
- # calva (22)
- # chlorine-clover (60)
- # cider (1)
- # clj-kondo (9)
- # cljdoc (6)
- # cljs-dev (37)
- # cljss (2)
- # clojure (43)
- # clojure-europe (3)
- # clojure-finland (23)
- # clojure-italy (1)
- # clojure-nl (4)
- # clojure-norway (3)
- # clojure-spec (56)
- # clojure-uk (148)
- # clojuredesign-podcast (1)
- # clojurescript (11)
- # conjure (5)
- # core-async (22)
- # cursive (9)
- # datascript (5)
- # datomic (4)
- # duct (8)
- # emotion-cljs (2)
- # figwheel-main (15)
- # fulcro (53)
- # graalvm (68)
- # helix (2)
- # jackdaw (1)
- # kaocha (9)
- # lambdaisland (1)
- # malli (10)
- # meander (2)
- # news-and-articles (1)
- # observability (12)
- # off-topic (17)
- # pathom (1)
- # pedestal (25)
- # practicalli (1)
- # protojure (4)
- # re-frame (2)
- # reagent (57)
- # reitit (1)
- # releases (2)
- # shadow-cljs (69)
- # specter (6)
- # tools-deps (10)
- # vim (16)
- # vscode (4)
- # yada (3)
Hi all,
I am trying to use chlorine with Atom but i can't evaluate anything in cljs. I use shadow-cljs and start it like this:
clj -A:shadow-cljs watch app
I connect the repl in atom and then use connect embeded but while trying to evaluate seomthing in a cljs file, i've got:
clojure.lang.ExceptionInfo:"Timeout while waiting for REPL result."
Hi, can you evaluate something with shadow-cljs' clojurescript REPL? Like, if you run clj -A:shadow-cljs cljs-repl app
, do you get a REPL, and can you evaluate things on it?
Do you have a JS environment connected?
For example, if you're compiling a browser target, is the browser on the page that loads the shadow-cljs compile javascript file?
Or, if you're developing a node app, do you have node running the end script?
Now, can you evaluate in Chlorine, or even then, it's not working?
Ok, so, let me check: when you watch the build, it creates a javascript file somewhere.
1. Are you importing it on a html file?
2. Do you have a server connected that serves both the JS and the HTML?
3. Is the browser window opened in that path?
4. If the browser is opened, if you enable devtools do you see something like "Shadow-CLJS Websocket Connected" on the devtools console?
5. Can you evaluate code in the REPL that appears when you run clj -A:shadow-cljs cljs-repl app
?
If all of the above are working, Chlorine should be able to evaluate CLJS files. I don't really know what browser-repl
option does, to be honest... 😞
Can you do this checklist, and tell me if there's any problem with any of then? Maybe we can debug together too, or add some missing documentation to the plug-in 🙂
1. I render an html page in clojure using ring as a server on port 8080. 2. I start the project using:
Ok, now can you open your browser on localhost:8080
? And open devtools, and see if some message appeared that you're connected to shadow-cljs?
(I'm remembering right now that I had some troubles once with some CORS-related stuff on my dev environment, but let's check if it's indeed the case 😄)
Let me ask you one more thing... Chlorine have an option called "Enable experimental features". Do you have it enabled?
Also, the command (shadow/node-repl)
does not connect to the browser env...
It loads a REPL connected to node
The right command is ((shadow.cljs.devtools.api/repl :app)
(`:app` being the target you're watching)
Probably in that REPL you connected you can't run (js/alert "Hello")
, for example...
(I really need to improve documentation on these shadow-cljs targets.... :thinking_face: )
i did remove the experimental feature and choose cljs in evalute settings options in atom-chlorine
Ok, glad it worked. But I'm not really sure why 😄
To be honest, Chlorine should work without you needing to connect the CLJS REPL inside Shadow (basically, it runs the same command that you ran: (shadow.cljs.devtools.api/repl :app)
internally, and then uses the result to connect to REPL).
I imagine it's something wrong on experimental features - I was experimenting on using some internal Shadow APIs to make things more configurable. What's the version of shadow that you're using? Maybe I can also debug things here...
@ouvasam you just found a bug on Chlorine 😄
With Experimental Features turned on, it fails to evaluate ClojureScript 😄