This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-20
Channels
- # aws (1)
- # babashka (68)
- # beginners (68)
- # braveandtrue (6)
- # calva (4)
- # cider (10)
- # clj-kondo (26)
- # clojure (76)
- # clojure-dev (18)
- # clojure-europe (1)
- # clojure-norway (25)
- # clojure-spec (8)
- # clojure-sweden (7)
- # clojure-uk (3)
- # clojuredesign-podcast (1)
- # clojurescript (11)
- # conjure (29)
- # cursive (31)
- # datomic (29)
- # emacs (12)
- # fulcro (29)
- # graphql (3)
- # helix (2)
- # hoplon (39)
- # hugsql (4)
- # malli (3)
- # off-topic (62)
- # pedestal (8)
- # re-frame (23)
- # reagent (14)
- # rewrite-clj (10)
- # shadow-cljs (18)
- # spacemacs (3)
- # sql (13)
- # xtdb (32)
I have a local file JS import: ["./antmedia/webrtc_adaptor.js" :refer [WebRTCAdaptor]]
Its working fine. The file is being imported and all the functionality is there.
The issue is that, In dev mode, if I make changes to that JS file, shadow-cljs doesn’t seem to notice and doesn’t do a rebuild.
Is that expected behavior? Or am I doing something wrong?
I also tried putting it in a parallel directory as per https://shadow-cljs.github.io/docs/UsersGuide.html#_requiring_js (and modified the :require statement to match) and it again worked correctly if I restarted shadnow-cljs watch but shadow-cljs still did not rebuild when I changed something in the js file.
Where is the tap>
feature documented?
How can you use the inspect feature of shadow-CLJS with regular Clojure?
Got it in my notes haha
(require '[shadow.cljs.devtools.server :as server])
(server/start!)
(tap> :hello)
I'm developing an app in chrome but over LAN on a mobile device, using the setting in shadow-cljs.edn
:log {:level :debug}
my runtime keeps disconnecting from shadow and I see this log
[2020-06-20 15:59:27.446 - FINE] :shadow.remote.relay.local/client-disconnect - {:client-id 52, :client-info {:since #inst "2020-06-20T22:59:07.397-00:00", :proc-id "d6e4f00e-4f36-442d-a752-0894a052b5f0", :connection-info {:remote true, :websocket true}, :user-agent "Chrome 537.36 [Linux armv8l]", :type :runtime, :lang :cljs, :build-id :back-office, :host :browser, :dom true}}
but looking at the remote chrome devtools network tab i see a sente websocket connection to my server remains robust but but the shadow connection keeps dieing, any ideas why?the message frames for the shadow WS connection always look like this, before dying
["^ ","~:op","~:welcome","~:client-id",47]
["^ ","~:op","~:hello","~:client-info",["^ ","~:host","~:browser","~:user-agent","Chrome 537.36 [Linux armv8l]","~:dom",true,"~:type","~:runtime","~:lang","~:cljs","~:build-id","~:back-office","~:proc-id","d6e4f00e-4f36-442d-a752-0894a052b5f0"]]
["^ ","~:op","~:request-notify","~:notify-op","~:shadow.cljs.devtools.client.env/worker-notify","~:query",["~:eq","~:shadow.cljs.model/worker-for","~:back-office"]]
["^ ","~:op","~:request-supported-ops","~:from",3]
["^ ","~:op","~:supported-ops","~:ops",["~#set",["~:ping","~:shadow.cljs.devtools.client.env/worker-notify","~:tap-unsubscribe","~:obj-forget","~:cljs-asset-update","~:cljs-build-start","~:runtime-print-unsub","~:obj-describe","~:cljs-build-complete","~:cljs-eval","~:tap-subscribe","~:request-tap-history","~:obj-request","~:cljs-build-failure","~:obj-forget-all","~:js-eval","~:shadow.cljs.devtools.client.shared/runtime-print-disconnect","~:runtime-print-sub","~:cljs-runtime-init","~:cljs-build-configure","~:access-denied"]],"~:to",3] 539
["^ ","~:op","~:tap-subscribe","~:summary",true,"~:history",true,"~:from",3]
["^ ","~:op","~:tap-subscribed","~:history",[],"~:to",3]
reading the shadow source and these messages, it looks like the server sends a :ping
and the client is supposed to respond with a :pong
https://github.com/thheller/shadow-cljs/blob/5a32abb215c81c26268967ed4439303bb348e5d0/src/main/shadow/cljs/ui/worker/relay_ws.cljs#L90
but in these messages the client is never sending the :pong
, nor do I see any error messages in the logs
is there anyway to get more insight into why this might be happening?
in the messages for sente, I see sente just sends a ping to the server every 20 seconds, would that design be more robust? rather than having the client wait for the server to tell it to ping/pong, just have the client ping on some regular interval
not having my usual shadow-cljs repl is really hindering progress
@currentoor the server sends the ping every 5sec, not sure why it wouldn't. too tired to look into this now. would help if you have something reproducible.
Anyone have any wisdom/advice for deploying shadow-cljs apps to heroku? Or suggestions for an alternative to heroku that works well with clojurescript (currently just have a frontend so no worry about setting up a backend yet)
https://github.com/dpsutton/asg-ignite-presentation has an example app, a presentation going through the app, and a link to the app running on netlify