This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-31
Channels
- # aws (2)
- # beginners (101)
- # cider (8)
- # clara (8)
- # cljs-dev (3)
- # cljsrn (17)
- # clojars (2)
- # clojure (67)
- # clojure-austin (2)
- # clojure-finland (1)
- # clojure-france (5)
- # clojure-italy (3)
- # clojure-nl (3)
- # clojure-russia (2)
- # clojure-serbia (1)
- # clojure-spec (72)
- # clojure-uk (112)
- # clojurescript (92)
- # core-async (74)
- # core-typed (2)
- # cursive (8)
- # datomic (2)
- # duct (5)
- # emacs (35)
- # events (11)
- # fulcro (32)
- # instaparse (9)
- # jobs (1)
- # luminus (1)
- # lumo (3)
- # off-topic (118)
- # om (2)
- # onyx (10)
- # pedestal (5)
- # re-frame (21)
- # reagent (48)
- # reitit (40)
- # ring (12)
- # shadow-cljs (113)
- # spacemacs (21)
- # tools-deps (47)
It seems that when using the macro cljs.core/resolve
with code splitting (:modules functionality) that there are conditions where it is possible that a module (A) that triggers the load of another module (B) is compiled before the defs of module B have been processed into cljs.env/*compiler*
. This results in the defs in module B being empty at this point (https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L802) during the compilation of module A and causes the attempt at cljs.core/resolve
to fail here https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/core.cljc#L3288 . The attempt of module A to invoke the function in module B after load then fails at runtime. I have only encountered the issue with 1.10.238 (1.9.946 works correctly). Unfortunately, I have not been able to create a minimal case after several hours. Any ideas?
@symfrog resolve
does indeed generate unusable code. repro here https://github.com/thheller/cljs-bad-resolve