This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-23
Channels
- # announcements (2)
- # beginners (150)
- # calva (59)
- # cider (10)
- # clj-kondo (63)
- # cljs-dev (15)
- # cljsrn (34)
- # clojure (127)
- # clojure-dev (16)
- # clojure-europe (12)
- # clojure-italy (18)
- # clojure-nl (6)
- # clojure-russia (3)
- # clojure-uk (23)
- # clojurescript (18)
- # clojutre (15)
- # clr (2)
- # cursive (3)
- # datomic (26)
- # duct (6)
- # fulcro (9)
- # graalvm (3)
- # joker (9)
- # lambdaisland (1)
- # off-topic (12)
- # om (1)
- # pathom (29)
- # re-frame (16)
- # reagent (2)
- # shadow-cljs (57)
- # slack-help (2)
- # spacemacs (45)
- # sql (20)
- # xtdb (3)
- # yada (3)
If anything is unclear with what I’m trying to do above, let me know! 🙂
@martinklepsch you likely need to add this call so the goog deps are added to your compiler env https://github.com/clojure/clojurescript/blob/f021e99f2fab0069967ed134eecdf4be3b05958c/src/main/clojure/cljs/closure.clj#L2963
yeah, that’s most likely correct 😄
(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)]
(cljs.env/with-compiler-env state
(ana/no-warn
(cljs.closure/validate-opts opts)
(ana/analyze-file file opts)))
state))
although you likely don't want to re-create the compiler env for every file you analyze
I should shut up .. you probably have ana
as cljs.analyzer.api
in which case you code was correct
That still seems to fail to find the goog.obj namespace. Interestingly it doesn’t fail to find goog.object
but goog.obj
which is the alias used in one of the files being analyzed
There’s a tiny bit more context here: https://github.com/lread/cljdoc-analyzer/pull/6
Oh my, it seems that the jar actually contains a namespace that requires goog.obj
(i.e. has a typo)