This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-20
Channels
- # announcements (1)
- # beginners (48)
- # cljdoc (6)
- # cljs-dev (1)
- # cljsjs (1)
- # clojure (13)
- # clojure-dev (6)
- # clojure-estonia (1)
- # clojure-europe (1)
- # clojure-finland (8)
- # clojure-gamedev (3)
- # clojure-spec (35)
- # clojure-uk (25)
- # clojurescript (9)
- # datascript (1)
- # datomic (18)
- # figwheel-main (2)
- # fulcro (5)
- # graphql (1)
- # jobs (16)
- # off-topic (76)
- # pathom (39)
- # re-frame (6)
- # reagent (7)
- # remote-jobs (6)
- # rum (3)
- # shadow-cljs (54)
- # spacemacs (8)
- # speculative (2)
- # yada (72)
Playing with shadow tonight and just found out about the dashboard (to turn builds on/off, etc). It’s awesome; great work @thheller! 🙂
It seems like shadow-cljs (2.7.16) will only occasionally reload my css code when I modify it. Any idea what could be the cause? How can I debug this?
If I keep saving my file, it eventually reloads, but it typically takes 3-5 saves.
FWIW I’m running shadow-cljs watch app
on OSX
@wombawomba not sure. nothing in that area of the code was touched for a very long time
yeah, I had the same issue in 2.3.0 before upgrading
@thheller I set those options and I seem to get more verbose logging, but nothing is printed on CSS reloads
maybe I just have a rogue shadow-cljs process somewhere and this is some kind of race condition?
nope, that’s not it
I do get the message in the browser, but only when the reload actually works
can I run a checked out version of shadow-cljs somehow, and add my own logging?
also, where in the code does the CSS reloading happen?
hmm… how do I run the lein install
ed code?
oh okay, neat
alright
are you running in a container or otherwise mounted filesystem maybe? maybe the fs-watch just misses the event
nope, just straight up OS X
but I think I’ve solved the problem 🙂
@thheller here’s an issue and PR: https://github.com/thheller/shadow-cljs/issues/430 https://github.com/thheller/shadow-cljs/pull/431
@wombawomba which editor do you use? the order of events seems to depend on how the editor saves actual files
I used Neovim
what’s weird is that fsnotify
always correctly detects the writes as a single file change (see “Additional Details” at the bottom of the issue)
I suspect that neovim creates a temp file and then moves/renames that file to replace the old one
yup, seems like it (depending on config): https://stackoverflow.com/questions/13563627/how-does-vim-save-files
So I just upgraded from shadow-cljs 2.3.0 to 2.7.16, and this seems to have broken the way I use auth0-lock (https://github.com/auth0/lock). My dependency is "auth0-lock": "^11.13.0"
and I require it via (:require [auth0-lock :refer [Auth0Lock]])
. In shadow-cljs 2.3.0 Auth0Lock
is an object, but in 2.7.16 it’s nil
. Any idea why?
played around with different shadow-cljs versions, and it seems like it fails starting with shadow-cljs 2.4.8 (https://github.com/thheller/shadow-cljs/releases/tag/2.4.8)
for the versions where it fails, I get the following error in the browser console:
shadow.js.js:82 Uncaught TypeError: Cannot read property 'lib' of undefined
at auth0.min.js:9
at auth0.min.js:9
at createCommonjsModule (auth0.min.js:9)
at auth0.min.js:9
at auth0.min.js:9
at Object.shadow$provide.module$node_modules$auth0_js$dist$auth0_min (auth0.min.js:9)
at shadow.js.jsRequire (shadow.js.js:79)
at Object.shadow$provide.module$node_modules$auth0_lock$lib$utils$cdn_utils (cdn_utils.js:8)
at shadow.js.jsRequire (shadow.js.js:79)
at Object.shadow$provide.module$node_modules$auth0_lock$lib$i18n (i18n.js:37)
@wombawomba that is odd. try settings :js-options {:variable-renaming :local}
in your build config
unfortunately it seems that some npm libs only work with one setting while the others only work with the other
@thheller yeah that worked
thanks!