This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-30
Channels
- # aleph (2)
- # announcements (8)
- # babashka (12)
- # beginners (34)
- # calva (36)
- # cherry (3)
- # cider (1)
- # clj-kondo (11)
- # clj-otel (6)
- # cljdoc (31)
- # clojure (121)
- # clojure-conj (1)
- # clojure-czech (2)
- # clojure-europe (109)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (3)
- # cursive (3)
- # datahike (1)
- # datomic (9)
- # deps-new (6)
- # docker (5)
- # emacs (21)
- # fulcro (4)
- # hoplon (16)
- # introduce-yourself (2)
- # london-clojurians (5)
- # lsp (87)
- # malli (17)
- # missionary (1)
- # nbb (27)
- # off-topic (257)
- # pathom (4)
- # portal (42)
- # practicalli (1)
- # rdf (3)
- # releases (2)
- # shadow-cljs (49)
- # slack-help (3)
- # timbre (2)
hi, can build hooks be node scripts?
what would you even do in a node script that makes sense? likely just trying to abuse build hooks for something they werent meant to do? 😛
how did you know
Ok, how can I debug lifecycle hooks? I don't know what's happening, if anything happens at all
I was looking there too. I don't see anything, so I will assume nothing runs. I just need to figure out why.
hard to say details when I am not sure what I am doing. I wanted to have a backend node service, but I am unable to setup the lifecycle hooks to that too.
sorry, this is more difficult than I expected:D i want to write a backend server and have the normal devtools available while writing it
yeah, thanks, I just misunderstood the docs, thought it would work because the :target wasn't specified in the example and I wrongly assumed it's more general than what actually is. But I don't need shadow-cljs to do this auto-restart, just would be nice to not have to manually ctrl+c and restart 200 times a day
I agree that restarting 200 times a day is not great. hot-reload/REPL give you the option to drastically reduce that. I usually start my clojure REPL once a week or so, same could be true for a node script in theory. All depends on your workflow.
Is there a way to disable the websocket stuff in watch mode? I'm using target esm on node but when I want to invoke a test script , I'm getting:
file:///Users/borkdude/dev/trip/out/cljs-runtime/shadow.cljs.devtools.client.websocket.js:21
return shadow.cljs.devtools.client.websocket.start.cljs$core$IFn$_invoke$arity$2(WebSocket,runtime);
I know esm is for browsers but it works perfectly fine for node.js too including the build report, except this bit@U05224H0W I think I have an issue with vanilla CLJS advanced vs shadow-cljs advanced in the area of keywords, but I haven't gotten to the root of this. But I suspect it may be related to the keyword optimizations in shadow. Is there a way to disable that in advanced, to debug this issue?
only thing you can set is :compiler-options {:shadow-keywords true}
which optimizes it even more
hmm, no that wasn't it. I thought that keywords optimized at build time weren't correctly matched against keywords created at runtime, but it works. the issue I'm having is with clojure.spec.alpha which dynamically processes some input at runtime, which works with vanilla but not with shadow... I'll debug further