This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-07
Channels
- # babashka (7)
- # beginners (218)
- # boot (1)
- # chlorine-clover (2)
- # cider (36)
- # cljsrn (8)
- # clojure (71)
- # clojure-dev (9)
- # clojure-europe (11)
- # clojure-france (1)
- # clojure-italy (5)
- # clojure-nl (5)
- # clojure-uk (24)
- # clojurescript (9)
- # conjure (16)
- # cursive (65)
- # datomic (76)
- # devcards (21)
- # emacs (1)
- # etaoin (1)
- # figwheel-main (47)
- # fulcro (37)
- # hyperfiddle (9)
- # java (2)
- # kaocha (1)
- # malli (11)
- # music (14)
- # observability (8)
- # off-topic (32)
- # re-frame (13)
- # reagent (2)
- # reitit (5)
- # ring (3)
- # shadow-cljs (40)
- # slack-help (17)
- # spacemacs (15)
- # tools-deps (5)
- # xtdb (16)
Q: anyone know how to build shadow-based devcards for a prod release? I’m trying to make it work here https://github.com/stevebuik/fork-malli-ideas
@steveb8n you are only setting :devcards true
for dev. move that "up". also don't set :optimizations :none
is never has any effect anywhere is already the forced default for dev
How can I debug hot reloading? For some reason, this week it's stopped working for me. 😞
The rebuild is triggered, I see the Shadow spinner in the browser, but the page doesn't get updated. 😕
I have an :npm-module
which is used by a larger webpack'ed application. AFAIK the only thing that's changed since last week is that I updated a bunch of packages on my machine (Debian Testing), mostly libraries. I tried downgrading Chromium, to no avail.
@mel.collins what does the console say? is you after-load hook getting called? if so you must debug your app not shadow-cljs
I did a long-overdue upgrade of shadow-cljs not long ago, and if I revert to the previous version (2.8.something) it works again, so maybe I missed an important change? (though I'm not sure why it would've taken a week to manifest)
maybe the usual version conflict? make sure you have no conflicts if you use project.clj/deps.edn
I do use deps.edn, but the shadow-cljs version does match between that and package.json.
core.async was at a very different version to shadow's deps, but updating it didn't fix the issue
Hmm, downgrading clojurescript from .773 to .597 (as in shadow-cljs/deps.edn) causes errors with cider/piggyback.clj. Am I looking at the right file there?
Ah, clojars. I had a feeling there was somewhere else that I found the dep versions previously
Hm. I had to add closure-compiled-unshaded, but I now have all four of the "important" dependencies specified at the same versions in my deps as on clojars, but still no dice 😕
Bah. I just tried using shadow-cljs.edn for dependencies (without shadow's own deps) and hot reloading still doesn't work 😞
The only thing from Shadow in the browser console is: "shadow-cljs: #3 ready!" The things my before-load and after-load should both print to the console don't appear.
in the watch I get the usual:
[:npm] Compiling ...
[:npm] Build completed. (321 files, 2 compiled, 0 warnings, 0.44s)
In the browser, I get nothing from shadow. Just webpack doing its normal:
[HMR] bundle rebuilding
...
Ignored an update to declined module ../path/to/my/yarn/linked/cljs/module.js
FWW, on startup, the watch
warns about: Nashorn engine, a too-new react
version, and an illegal reflective access by mranderson048; but none of those are new
webpack's reloading is declined in the module which imports the cljs module, which has worked previously
sorry can't help you with this. too many unknowns. if you make a reproducible example I can take a look but running webpack HMR together with watch
seems like a recipe for disaster
Yeah, thanks for the help anyway. 🙂 The setup has worked well so far, but it looks like some change in Shadow (since 2.8.55!) broke it. I'll go back and try to find the version/change where it stopped working, and debug from there.
Not how I intended to spend my last workday before holiday, but these things happen 😄
@thheller Looks like the cause was this part in build/targets/npm_module.clj
:
(cond->
...
(and (= :dev mode) (:worker-info state))
(update config :devtools merge {:autoload false ;; doesn't work yet, use built-in for now
:use-document-host false}))
Before this was changed (in 2.8.56), autoload
was mis-spelled, so didn't actually get disabled: https://github.com/thheller/shadow-cljs/commit/c75fa3376efdbc8405e5f978db1db5f748861c55
However, when autoload is not false
'd here, hot reloading works in my environment, so I'm not sure what the comment is referring to as not working?