clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "RELEASE"}}}'
Clojure 1.10.3
user=> (require '[cljs.analyzer.api :as api])
nil
user=> (source api/ns-publics)
Execution error at user/eval138 (REPL:1).
Invalid token: ::ana/namespaces
user=>
不确定这是否是一个已知的问题。
ns-publics 的来源
(defn ns-publics
"Given a namespace return all the public var analysis maps. Analagous to
clojure.core/ns-publics but returns var analysis maps not vars."
([ns]
(ns-publics env/*compiler* ns))
([state ns]
{:pre [(symbol? ns)]}
(->> (merge
(get-in @state [::ana/namespaces ns :macros])
(get-in @state [::ana/namespaces ns :defs]))
(remove (fn [[k v]] (:private v)))
(into {}))))