ERROR: contains? not supported on type: clojure.lang.PersistentList

472 views
Skip to first unread message

Sonny To

unread,
Aug 17, 2016, 1:24:34 PM8/17/16
to ClojureScript
I get this error message upgrading to [org.clojure/clojurescript "1.9.216" ]

When I looked at /home/sto/.boot/cache/tmp/home/sto/workspace/food-truck/irg/-unb393/public/js/koala.out/com/kaicode/tily.cljc , there is no reference to contains?


WARNING: to-array already refers to: cljs.core/to-array being replaced by: com.kaicode.tily/to-array at line 28 /home/sto/.boot/cache/tmp/home/sto/workspace/food-truck/irg/-unb393/public/js/koala.out/com/kaicode/tily.cljc
adzerk.boot_cljs.util.proxy$clojure.lang.ExceptionInfo$ff19274a: ERROR: contains? not supported on type: clojure.lang.PersistentList at file /home/sto/.boot/cache/tmp/home/sto/workspace/food-truck/irg/-unb393/public/js/koala.out/com/kaicode/tily.cljc, line 28, column 4

data: {:file
"/home/sto/.boot/cache/tmp/home/sto/workspace/food-truck/irg/-unb393/public/js/koala.out/com/kaicode/tily.cljc",
:line 28,
:column 4,
:tag :cljs/analysis-error,
:from :boot-cljs}
adzerk.boot_cljs.util.proxy$java.lang.Throwable$ff19274a: contains? not supported on type: clojure.lang.PersistentList
...
clojure.core/contains?/invokeStatic core.clj: 1443
clojure.core/contains? core.clj: 1435
cljs.analyzer$core_name_QMARK_.invokeStatic analyzer.cljc: 729
cljs.analyzer$core_name_QMARK_.invoke analyzer.cljc: 721
cljs.analyzer$resolve_var.invokeStatic analyzer.cljc: 806
cljs.analyzer$resolve_var.invoke analyzer.cljc: 731
cljs.analyzer$resolve_var.invokeStatic analyzer.cljc: 734
cljs.analyzer$resolve_var.invoke analyzer.cljc: 731
cljs.analyzer$eval902$fn__903.invoke analyzer.cljc: 1190
...
cljs.analyzer$analyze_seq_STAR_.invokeStatic analyzer.cljc: 2708
cljs.analyzer$analyze_seq_STAR_.invoke analyzer.cljc: 2706
cljs.analyzer$analyze_seq_STAR__wrap.invokeStatic analyzer.cljc: 2713
cljs.analyzer$analyze_seq_STAR__wrap.invoke analyzer.cljc: 2711
cljs.analyzer$analyze_seq.invokeStatic analyzer.cljc: 2734
cljs.analyzer$analyze_seq.invoke analyzer.cljc: 2715
cljs.analyzer$analyze_form.invokeStatic analyzer.cljc: 2852
cljs.analyzer$analyze_form.invoke analyzer.cljc: 2848
cljs.analyzer$analyze_STAR_.invokeStatic analyzer.cljc: 2899
cljs.analyzer$analyze_STAR_.invoke analyzer.cljc: 2890
cljs.analyzer$analyze.invokeStatic analyzer.cljc: 2915
cljs.analyzer$analyze.invoke analyzer.cljc: 2902
cljs.analyzer$analyze_seq.invokeStatic analyzer.cljc: 2735
cljs.analyzer$analyze_seq.invoke analyzer.cljc: 2715
cljs.analyzer$analyze_form.invokeStatic analyzer.cljc: 2852
cljs.analyzer$analyze_form.invoke analyzer.cljc: 2848
cljs.analyzer$analyze_STAR_.invokeStatic analyzer.cljc: 2899
cljs.analyzer$analyze_STAR_.invoke analyzer.cljc: 2890
cljs.analyzer$analyze.invokeStatic analyzer.cljc: 2915
cljs.analyzer$analyze.invoke analyzer.cljc: 2902
cljs.compiler$emit_source.invokeStatic compiler.cljc: 1252
cljs.compiler$emit_source.invoke compiler.cljc: 1232
cljs.compiler$compile_file_STAR_$fn__2875.invoke compiler.cljc: 1304
cljs.compiler$with_core_cljs.invokeStatic compiler.cljc: 1154
cljs.compiler$with_core_cljs.invoke compiler.cljc: 1145
cljs.compiler$compile_file_STAR_.invokeStatic compiler.cljc: 1293
cljs.compiler$compile_file_STAR_.invoke compiler.cljc: 1289
cljs.compiler$compile_file$fn__2898.invoke compiler.cljc: 1374
cljs.compiler$compile_file.invokeStatic compiler.cljc: 1352
cljs.compiler$compile_file.invoke compiler.cljc: 1332
cljs.closure/compile-file/invokeStatic closure.clj: 474
cljs.closure/compile-file closure.clj: 465
cljs.closure/eval4645/fn closure.clj: 541
cljs.closure/eval4581/fn/G closure.clj: 431
cljs.closure/compile-from-jar/invokeStatic closure.clj: 523
cljs.closure/compile-from-jar closure.clj: 511
cljs.closure/eval4651/fn closure.clj: 551
cljs.closure/eval4581/fn/G closure.clj: 431
cljs.closure/compile-sources/iter/fn closure.clj: 871
...
clojure.core/next/invokeStatic core.clj: 64
clojure.core/dorun/invokeStatic core.clj: 3033
clojure.core/doall/invokeStatic core.clj: 3039
clojure.core/doall core.clj: 3039
cljs.closure/compile-sources/invokeStatic closure.clj: 867
cljs.closure/compile-sources closure.clj: 856
cljs.closure/build/invokeStatic closure.clj: 1988
cljs.closure/build closure.clj: 1927
cljs.build.api/build/invokeStatic api.clj: 199
cljs.build.api/build api.clj: 187
adzerk.boot-cljs.impl/compile-cljs/invokeStatic impl.clj: 90
adzerk.boot-cljs.impl/compile-cljs impl.clj: 67
...
clojure.core/apply/invokeStatic core.clj: 646
clojure.core/apply core.clj: 641
boot.pod/eval-fn-call pod.clj: 294
boot.pod/call-in* pod.clj: 315
...
boot.pod/call-in* pod.clj: 318
adzerk.boot-cljs/compile/invokeStatic boot_cljs.clj: 71
adzerk.boot-cljs/compile boot_cljs.clj: 59
adzerk.boot-cljs/compile-1/fn boot_cljs.clj: 125
clojure.core/binding-conveyor-fn/fn core.clj: 1938

Sean Corfield

unread,
Aug 17, 2016, 1:43:40 PM8/17/16
to clojur...@googlegroups.com
Based on the stacktrace, contains? is called from:

cljs.analyzer$core_name_QMARK_.invokeStatic analyzer.cljc: 729

so I suspect this may be a syntax error in your code (are you calling to-array somewhere?).

Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurescrip...@googlegroups.com.
To post to this group, send email to clojur...@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.




Sonny To

unread,
Aug 18, 2016, 12:43:33 PM8/18/16
to ClojureScript
Thanks again for responding. No syntax error in the code

However, out of desperation I fixed the warning
WARNING: to-array already refers to: cljs.core/to-array being replaced by: com.kaicode.tily/to-array at line 28 /home/sto/.boot/cache/tmp/home/sto/workspace/food-truck/f4h/-un\
b393/public/js/koala.out/com/kaicode/tily.cljc


by renamed the functions that were overriding functions defined in core: to-array => to-seq and hash => hash-me. I do not know why but that fixed the problem. Seems like a regression to me. functions in different namespace can have the same name even if it conflicts with core

the code is here https://github.com/sonwh98/tily/blob/master/src/com/kaicode/tily.cljc

Sean Corfield

unread,
Aug 18, 2016, 12:54:00 PM8/18/16
to clojur...@googlegroups.com
On 8/18/16, 9:43 AM, "Sonny To" <clojur...@googlegroups.com on behalf of son....@gmail.com> wrote:
> However, out of desperation I fixed the warning
> by renamed the functions that were overriding functions defined in core

You should be able to add (:refer-clojure :exclude [to-array hash]) to the ns form in the namespaces where those functions are defined (and used).

> I do not know why but that fixed the problem.

I have seen that with some of the new predicates introduced in Clojure 1.9.0 conflicting with certain functions in a few libraries (I ran into a problem like this with Encore until the maintainer added the appropriate refer/exclude). There are some situations where code that replaces core functions – which is what kaicode/tily is doing – can cause other code to fail.

> functions in different namespace can have the same name even if it conflicts with core

That’s why we use namespace aliases and qualify references to such functions – but the namespace that _defines_ those functions should exclude the core functions (as above) and you should never refer them directly into another namespace (via :use or :refer :all or even :refer by name).

Glad you got it working.

Sonny To

unread,
Aug 18, 2016, 1:09:52 PM8/18/16
to ClojureScript
thanks for the great explanation. I really need to take some time to understand the internals
Reply all
Reply to author
Forward
0 new messages