Welcome! Please see the About page for a little more info on how this works.

0 votes
in REPL by
clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "RELEASE"}}}'
Clojure 1.10.3
user=> (require '[cljs.analyzer.api :as api])
user=> (source api/ns-publics)
Execution error at user/eval138 (REPL:1).
Invalid token: ::ana/namespaces

Wasn't sure if this was a known issue.

Source of 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-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 {}))))

1 Answer

+1 vote
selected by
Best answer

I think we may have this logged somewhere already, has to do with how source macro does not have the ns context to resolve auto-resolved keywords at read time, which is definitely fixable now that we have pluggable resolver in read.