cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
martinklepsch 2019-09-22T15:41:05.034Z

Hey! i want to stub out some foreign libs for analysing cljs code in a function like this:

(defn- analyze-file [file]
  (let [opts  (-> {:foreign-libs [{:file "lib/fl.js"
                                   :provides ["react"]}]}
                  (cljs.closure/add-implicit-options))
        state (cljs.env/default-compiler-env opts)]
    (ana/no-warn
     (cljs.closure/validate-opts opts)
     (ana/analyze-file state file opts))
    state))
with this approach however the analyzer throws an error that other namespaces like goog.object can’t be found

martinklepsch 2019-09-22T15:43:26.034800Z

How would I directly pass the information that usually is provided via deps.cljs to the analyzer env?