This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-06
Channels
- # announcements (2)
- # babashka (22)
- # beginners (93)
- # calva (12)
- # cider (65)
- # clj-kondo (15)
- # cljdoc (5)
- # cljs-dev (4)
- # cljsrn (4)
- # clojure (65)
- # clojure-europe (2)
- # clojure-italy (1)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojure-spec (40)
- # clojure-uk (7)
- # clojurescript (12)
- # conjure (1)
- # cursive (2)
- # data-science (13)
- # datomic (1)
- # dirac (12)
- # emacs (3)
- # figwheel-main (19)
- # ghostwheel (5)
- # helix (6)
- # kaocha (1)
- # leiningen (6)
- # news-and-articles (2)
- # off-topic (17)
- # pathom (5)
- # re-frame (59)
- # reitit (17)
- # restql (1)
- # shadow-cljs (31)
- # spacemacs (5)
- # spire (3)
- # sql (35)
If I add a npm-deps map to my package, it works as expected. When my package doesn't have npm-deps in its config, but it depends on a package that does I get that error. And as soon as I add some npm-deps in my current package, it all works as expected. And I pulled down ClojureScript at commit for v1.10.773 and if I change this:
(merge
{:hashbang false
:infer-externs true
:nodejs-rt false
:target :nodejs}
(when-not (:npm-deps opts)
{:npm-deps true}))
to this:
(merge
{:hashbang false
:infer-externs true
:nodejs-rt false
:target :nodejs}
(when-not (:npm-deps opts)
{:npm-deps {}}))
It fixes it. If I change it back to true, I get the error again.
On a quick glance, this seems like a safe change, everything else in closure.clj seems to assume npm-deps will be a map, except for one (not (false? npm-deps))
check, but this will work as well in this case, since it is explicit about checking for not false?
instead of true?
. It also means this is now redundant:
(defn check-npm-deps [{:keys [npm-deps]}]
(let [npm-deps (if (true? npm-deps) {} npm-deps)
Hello friends, I was looking at clojurescript code base and I was wondering why cljs compiler does not use clojure.tools.analyzer
as it uses tools.reader
. Thanks a lot