Fork me on GitHub
#shadow-cljs
<
2020-03-16
>
Pavel Klavík01:03:40

Hi, I have upgraded to Shadow-cljs 2.8.92 right now and I was getting the following new error during the compilation:

Pavel Klavík01:03:40

[:client] Build failure:
------ ERROR -------------------------------------------------------------------
 File: C:\Shared\orgpad\src\orgpad\client\subs\unit.cljs:47:38
--------------------------------------------------------------------------------
  47 |          {:size/keys [width height]} ((if show-content :unit/size :unit/title-size)
--------------------------------------------^-----------------------------------
Error in phase :compilation
ClassCastException: class clojure.lang.PersistentList cannot be cast to class clojure.lang.Named (clojure.lang.PersistentList and clojure.lang.Named are in unnamed module of loader 'app')
        clojure.core/name (core.clj:1595)
        clojure.core/name (core.clj:1589)
        shadow.build.cljs-hacks/shadow-parse-invoke* (cljs_hacks.cljc:783)
        shadow.build.cljs-hacks/shadow-parse-invoke* (cljs_hacks.cljc:730)
        cljs.analyzer/parse-invoke (analyzer.cljc:3690)
        cljs.analyzer/parse-invoke (analyzer.cljc:3688)
        cljs.analyzer/analyze-seq* (analyzer.cljc:3935)
        cljs.analyzer/analyze-seq* (analyzer.cljc:3932)
        cljs.analyzer/analyze-seq*-wrap (analyzer.cljc:3939)
        cljs.analyzer/analyze-seq*-wrap (analyzer.cljc:3937)
        cljs.analyzer/analyze-seq (analyzer.cljc:3963)
        cljs.analyzer/analyze-seq (analyzer.cljc:3941)
        cljs.analyzer/analyze-form (analyzer.cljc:4150)
        cljs.analyzer/analyze-form (analyzer.cljc:4147)
        cljs.analyzer/analyze* (analyzer.cljc:4200)
        cljs.analyzer/analyze* (analyzer.cljc:4191)
        cljs.analyzer/analyze (analyzer.cljc:4220)
        cljs.analyzer/analyze (analyzer.cljc:4203)
        cljs.analyzer/analyze (analyzer.cljc:4213)
        cljs.analyzer/analyze (analyzer.cljc:4203)
        cljs.analyzer/analyze (analyzer.cljc:4211)
        cljs.analyzer/analyze (analyzer.cljc:4203)
        cljs.analyzer/analyze-let-binding-init (analyzer.cljc:2273)
        cljs.analyzer/analyze-let-binding-init (analyzer.cljc:2271)
        cljs.analyzer/analyze-let-bindings* (analyzer.cljc:2293)
        cljs.analyzer/analyze-let-bindings* (analyzer.cljc:2282)
        cljs.analyzer/analyze-let-bindings (analyzer.cljc:2327)
        cljs.analyzer/analyze-let-bindings (analyzer.cljc:2326)
        cljs.analyzer/analyze-let (analyzer.cljc:2353)
        cljs.analyzer/analyze-let (analyzer.cljc:2337)
        cljs.analyzer/fn--1994 (analyzer.cljc:2391)
        cljs.analyzer/fn--1994 (analyzer.cljc:2389)
        clojure.lang.MultiFn.invoke (MultiFn.java:252)
        cljs.analyzer/analyze-seq* (analyzer.cljc:3934)
        cljs.analyzer/analyze-seq* (analyzer.cljc:3932)
        cljs.analyzer/analyze-seq*-wrap (analyzer.cljc:3939)
        cljs.analyzer/analyze-seq*-wrap (analyzer.cljc:3937)
        cljs.analyzer/analyze-seq (analyzer.cljc:3963)
        cljs.analyzer/analyze-seq (analyzer.cljc:3941)
        cljs.analyzer/analyze-form (analyzer.cljc:4150)
        cljs.analyzer/analyze-form (analyzer.cljc:4147)
        cljs.analyzer/analyze* (analyzer.cljc:4200)
        cljs.analyzer/analyze* (analyzer.cljc:4191)
        cljs.analyzer/analyze (analyzer.cljc:4220)
        cljs.analyzer/analyze (analyzer.cljc:4203)
        cljs.analyzer/analyze-seq (analyzer.cljc:3964)
        cljs.analyzer/analyze-seq (analyzer.cljc:3941)
        cljs.analyzer/analyze-form (analyzer.cljc:4150)
        cljs.analyzer/analyze-form (analyzer.cljc:4147)
        cljs.analyzer/analyze* (analyzer.cljc:4200)
        cljs.analyzer/analyze* (analyzer.cljc:4191)
        cljs.analyzer/analyze (analyzer.cljc:4220)
        cljs.analyzer/analyze (analyzer.cljc:4203)
        cljs.analyzer/analyze (analyzer.cljc:4213)
        cljs.analyzer/analyze (analyzer.cljc:4203)
        cljs.analyzer/analyze (analyzer.cljc:4211)
        cljs.analyzer/analyze (analyzer.cljc:4203)
        cljs.analyzer/fn--1962 (analyzer.cljc:2252)
        cljs.analyzer/fn--1962 (analyzer.cljc:2248)
        clojure.lang.MultiFn.invoke (MultiFn.java:252)
        cljs.analyzer/analyze-seq* (analyzer.cljc:3934)
        cljs.analyzer/analyze-seq* (analyzer.cljc:3932)
        cljs.analyzer/analyze-seq*-wrap (analyzer.cljc:3939)
        cljs.analyzer/analyze-seq*-wrap (analyzer.cljc:3937)
        cljs.analyzer/analyze-seq (analyzer.cljc:3963)
        cljs.analyzer/analyze-seq (analyzer.cljc:3941)
        cljs.analyzer/analyze-form (analyzer.cljc:4150)
        cljs.analyzer/analyze-form (analyzer.cljc:4147)
        cljs.analyzer/analyze* (analyzer.cljc:4200)
        cljs.analyzer/analyze* (analyzer.cljc:4191)
        cljs.analyzer/analyze (analyzer.cljc:4220)
        cljs.analyzer/analyze (analyzer.cljc:4203)
        cljs.analyzer/analyze (analyzer.cljc:4213)
        cljs.analyzer/analyze (analyzer.cljc:4203)
        cljs.analyzer/analyze (analyzer.cljc:4211)
        cljs.analyzer/analyze (analyzer.cljc:4203)
        cljs.analyzer/fn--1770/fn--1774 (analyzer.cljc:1655)
        cljs.analyzer/fn--1770 (analyzer.cljc:1655)
        cljs.analyzer/fn--1770 (analyzer.cljc:1648)
        clojure.lang.MultiFn.invoke (MultiFn.java:252)

--------------------------------------------------------------------------------
  48 |                                       unit-map)]
  49 |      [width height])))

Pavel Klavík01:03:40

After changing the code to this:

(get unit-map (if show-content :unit/size :unit/title-size))
everything works, but the original code is correct as well.

thheller08:03:51

@pavel.klavik oops sorry about that. fixed in 2.8.93. thanks for the report.

👍 1
davewo23:03:56

@thheller we are trying to speed up our release build in a Dockerfile by attempting to cache .shadow-cljs between docker builds. We are seeing cache reads, followed by compiles and writes for files that have not changed between commits. What should I look for regarding inappropriate cache invalidations?