This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-08
Channels
- # announcements (5)
- # babashka (46)
- # beginners (206)
- # boot (1)
- # bristol-clojurians (1)
- # calva (9)
- # chlorine-clover (27)
- # cider (1)
- # clara (10)
- # clj-kondo (105)
- # cljsrn (2)
- # clojars (1)
- # clojure (104)
- # clojure-europe (6)
- # clojure-nl (2)
- # clojure-uk (18)
- # clojurescript (44)
- # conjure (10)
- # core-async (34)
- # cursive (28)
- # data-science (6)
- # datomic (14)
- # emacs (44)
- # events (1)
- # figwheel-main (1)
- # fulcro (13)
- # graphql (9)
- # helix (12)
- # kaocha (2)
- # meander (4)
- # off-topic (2)
- # pathom (1)
- # quil (1)
- # re-frame (21)
- # shadow-cljs (49)
- # spacemacs (6)
- # xtdb (8)
I'm getting shadow-cljs stale client - you're not using the latest compilation output for some reason. I deleted my target and my out files and rebuilt using (shadow/watch :app) but I still get this prompt. How do I fix this?
Also, in the repl I get
No application has connected to the REPL server. Make sure your JS environment has loaded your compiled ClojureScript code.
@pshar10 you fix that by loading the correct files. seems like you maybe cleared the wrong directory or wrong server or so.
user=> (def ^:const y 1)
#'user/y
user=> (case 1 y true false)
false
user=> (case 'y y true false)
true
no clue. I never use ^:const
for anything. Maybe this is intentional. Maybe it actually works in CLJ and I'm just doing something wrong. the clojure docs clearly state that the test contants are not evaluated
I tried to put :source-map false :source-map-include-sources-content :false in compiler options for :dev build but I still see source maps files in the output dir, does it mean it didn't work? (I cleaned all dir before recompiling)
mhm I see this is known https://github.com/thheller/shadow-cljs/issues/328
@thheller would it be possible to allow disabling source-maps in dev? main reason is that they are mostly useless in react-native and result in huge bundles
btw do you think it would be possible for shadow to write index.js in a temp file and replace it only once it is done writing? to avoid the metro bundler bug
ah I think that was the only way to get the source maps to work at all when running the debug-in-chrome thingy
and how does the rewriting of the index.js works? would it be possible to do it in a temp file first ?
uhm doesn't :compiler-options {:source-map false}
not already turn off the source maps?
https://blog.fikesfarm.com/posts/2015-06-15-clojurescript-case-constants.html
when I macro expand in the clj repl, the macroexpansion works:
(macroexpand '(db-event :foo [foo bar] [:foo foo :bar bar]))
(do
:foo
(clojure.core/fn
[db__49764__auto__ [foo bar]]
(clojure.core/apply
clojure.core/assoc
db__49764__auto__
[:foo foo :bar bar])))
But in the shadow repl, this gives:
(macroexpand '(db-event :foo [foo bar] (assoc db :foo foo :bar bar)))
=> (db-event :foo [foo bar] (assoc db :foo foo :bar bar))
@pshar10 just a guess but maybe you didn't follow the instructions I sent you before again? https://code.thheller.com/blog/shadow-cljs/2019/10/12/clojurescript-macros.html
That article is gold, btw! Helped me to put a macros in no time! Thank you!
macros live completely in CLJ anyways so I usually just work on them via a CLJ REPL and macroexpand it there
well you can if its a CLJ REPL but that doesn't get you around the other limitations
wrote a new post https://code.thheller.com/blog/shadow-cljs/2020/05/08/how-about-webpack-now.html for people asking about how :bundle
affects shadow-cljs