This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-08
Channels
- # aleph (10)
- # announcements (4)
- # beginners (25)
- # calva (4)
- # cider (56)
- # clj-kondo (10)
- # cljdoc (1)
- # cljs-dev (58)
- # clojure (42)
- # clojure-austin (5)
- # clojure-dev (90)
- # clojure-europe (2)
- # clojure-greece (2)
- # clojure-italy (3)
- # clojure-nl (63)
- # clojure-quebec (1)
- # clojure-seattle (2)
- # clojure-spain (4)
- # clojure-spec (19)
- # clojure-uk (25)
- # clojuredesign-podcast (5)
- # clojurescript (24)
- # cursive (15)
- # datomic (1)
- # events (1)
- # figwheel-main (10)
- # fulcro (62)
- # graphql (7)
- # keechma (11)
- # nrepl (1)
- # off-topic (12)
- # re-frame (8)
- # reitit (2)
- # remote-jobs (3)
- # shadow-cljs (127)
- # specter (1)
- # sql (43)
- # testing (2)
- # tools-deps (30)
- # xtdb (1)
@ahmed1hsn do you see the heads-up display that the code has loaded?
@isak yes I do.
This might mean that the code was loaded correctly, but it's not being picked up by the running application.
Are you able to trigger a simple println
via the :after-load
configuration?
I assume keechma is able to do hot code reloading properly, given the example: https://keechma.com/annotated/graph-data/ (right at the bottom) There are a lot of gotchas with that in general, so it's useful to ensure all the steps are executing correctly.
This is console log of shadow-cljs
after saving changes to outcry_mobile/ui/main.cljs
. Problem is that changes visible in running application. Behavior and look of UI remains same after this.
Yes I'm already doing steps mentioned in above link.
(defn ^:dev/start start []
(print "startt")
(reload))
(defn reload []
(let [current @running-app]
(if current
(app-state/stop! current start-app!)
(start-app!))))
start-app! is callback, which is called after stop!.
current
is app-definition/app-config
here.
look at https://keechma.com/annotated/graph-data/ last lines of code at right here.
stop
callback is optional param
.
You can just have (app-state/stop! current)
called and app would be stopped. But you would have to start it again yourself.
So, we need to stop!
in ^:dev/before-load
and start-app!
in ^:dev/after-load
. right?
but you seem to have them configured in the build config already since they are getting called
do you have something like this in shadow-cljs.edn? https://github.com/mhuebert/shadow-re-frame/blob/master/shadow-cljs.edn#L31
I'm using keechma
.
something like this needs to get called after the code is reloaded: https://github.com/mhuebert/shadow-re-frame/blob/master/shadow-cljs.edn#L31
yeah, though I have reload hooks setup according to stop and start app.
@ahmed1hsn the browser console should tell you what shadow-cljs is doing
is this what the chat up here is refering to?
shadow-cljs - config: /home/hlolli/Documents/visitor/shadow-cljs.edn cli version: 2.8.40 node: v10.15.2
shadow-cljs - starting via "clojure"
Exception in thread "main" java.io.FileNotFoundException: Could not locate shadow/cljs/devtools/cli__init.class, shadow/cljs/devtools/cli.clj or shadow/cljs/devtools/cli.cljc on classpath.
I see, I noticed that my cli version was 2.8.40 and my project was 2.8.36. I'll add it, thanks!
hum what could cause shadow-cljs to just close after a little while ... after encountering the problem, i have updated to 2.8.40 on both npm and in my project and it still just closes after about a minute or so
and it actually starts normally? not like throws exception all over the place on startup?
it probably won't but you should still have one regardless. seems weird to not have one.
but yeah shadow-cljs itself definitely won't exit unless some exit condition is reached
hum i've been using kaocha for days at a time recently and i think it has both java and node cljs running
and you are doing absolutely nothing to the process? not even starting a watch or whatever?
running: cmd /C npm install --save react-grid-layout@^0.16.6 highlight.js@^9.12.0 reakit@^0.11.1 react-icons@^2.2.7
C:\Users\thheller\code\tmp\acme-app> npx shadow-cljs server
shadow-cljs - config: C:\Users\thheller\code\tmp\acme-app\shadow-cljs.edn cli version: 2.8.40 node: v11.9.0
shadow-cljs - updating dependencies
Retrieving thheller/shadow-cljs/2.8.40/shadow-cljs-2.8.40.pom from
Retrieving thheller/shadow-cljs/2.8.40/shadow-cljs-2.8.40-aot.jar from
shadow-cljs - dependencies updated
[2019-07-08 18:51:16.283 - WARNING] TCP Port 9630 in use.
shadow-cljs - server version: 2.8.40 running at
shadow-cljs - nREPL server started on port 51194
no clue why it would be killing node processes but these programs tend to do lots of nonsense ๐
no firewall, but malawre byte updated and is again "pro" for a little while, this has some port watching stuff i think
Hello everyone :) I am using the reagent-expo repository, with an updated expo SDK to 33 and set the target to web. I blocked request from /sockjs-node/* to allow hot reloading from shadow-cljs, but every time I compile the cljs code, expo also compile the web, but the website does not update. Anyone has some experience on how to solve this?
It is web, so I canโt find the expo option for it
It works perfectly on mobile
In the targets of the app.json, you can add โwebโ so that expo uses react native web
there probably is an option to disable the live-reload. just blocking the requests is not enough since it likely still has some sort of other connection open
Ok i will try to dig in! Thanks a lot for your help and for the tool!
You really made my path to cljs much easier!
This is console log of shadow-cljs
after saving changes to outcry_mobile/ui/main.cljs
. Problem is that changes visible in running application. Behavior and look of UI remains same after this.
@neo2551 It does hot load the code for me. I have https://github.com/neupsh/rn-rf-shadow which is fork from PEZ's repo based off of thheller's repo
I tried to understand what is the difference between theller version and the repo though lol
Thanks for answering on github :)
Ok i got it, in reagent-expo the main in package.json in the file in node_module, whereas in the other repos, the main is ./app/index.js