在尝试使用 `:global-exports` 包装一个javascript库时,我遇到了错误
Exception in thread "main" java.lang.IllegalArgumentException: contains? not supported on type: clojure.lang.Cons
at clojure.lang.RT.contains(RT.java:846)
at clojure.core$contains_QMARK_.invokeStatic(core.clj:1484)
at clojure.core$contains_QMARK_.invoke(core.clj:1476)
at cljs.analyzer$dep_has_global_exports_QMARK_.invokeStatic(analyzer.cljc:782)
...
库仓库:
https://github.com/colinkahn/deckgl-cljs
要重现
clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.339"} org.clojars.protocol55/deckgl {:mvn/version "0.1.1"}}}' -m cljs.main -e "(require 'com.uber.deckgl) (println com.uber.deckgl/DeckGL)"
删除 `:global-exports` 的相同库
clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.339"} org.clojars.protocol55/deckgl {:mvn/version "1.0.0"}}}' -m cljs.main -e "(require 'com.uber.deckgl) (println js/deck.DeckGL)"