This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-04
Channels
- # aleph (2)
- # beginners (80)
- # boot (18)
- # cider (6)
- # cljs-dev (14)
- # cljsrn (5)
- # clojure (114)
- # clojure-android (5)
- # clojure-dev (8)
- # clojure-greece (6)
- # clojure-italy (9)
- # clojure-russia (108)
- # clojure-uk (82)
- # clojurescript (158)
- # css (1)
- # cursive (21)
- # data-science (1)
- # datomic (66)
- # emacs (9)
- # ethereum (3)
- # fulcro (26)
- # graphql (7)
- # hoplon (25)
- # juxt (2)
- # keechma (34)
- # lein-figwheel (4)
- # leiningen (2)
- # off-topic (4)
- # om (5)
- # onyx (14)
- # parinfer (2)
- # pedestal (17)
- # planck (3)
- # portkey (14)
- # re-frame (23)
- # reagent (12)
- # ring (8)
- # rum (1)
- # shadow-cljs (506)
- # spacemacs (2)
- # vim (11)
- # yada (6)
I'm having trouble :require
'ing a particular :npm-deps
installed package: "No such namespace: [...]"; it works for other :npm-deps
so I figure there's just something weird about this particular library (https://github.com/uber/react-vis)
What's a good way to debug this? Is there a way to list all the namespaces provided by my :npm-deps
?
I tried (closure/maybe-install-node-deps! opts) (closure/index-node-modules ["react-vis"] opts)
from closure_tests.clj
, for opts
{:npm-deps {:react-vis "1.7.9" :react "16.0.0" :react-dom "16.0.0"}}
but the latter returns nil
(I suspect there's some side-effecting setup I'm missing)
^ this is an awesome way to use npm from the repl btw 😉
Clojure prints negative zero as -0.0
. I presumed that to have ClojureScript print it as -0
would be prohibitively expensive. Interestingly, this doesn't appear to be the case. By adding
(zero? obj) (if (neg? (/ obj)) "-0" "0")
to the number?
cond
in pr-writer-impl
, printing may actually be running faster. Benchmark results here https://gist.github.com/mfikes/862114a2c4675d6f0b375ac9212a7156
If there is no strong objection or reason not to do this, I could write up a JIRA ticket with the patch.@io react-vis
uses d3
which uses a bad UMD wrapper, which breaks the import via :npm-deps
also "main":"dist"
may be an issue, not sure if that is fixed yet. I think there was a ticket for it
Probably very n00b question, but I'm looking into https://dev.clojure.org/jira/browse/CLJS-2268
My problem is that I cannot seem to get the tests in src/test/cljs/clojure/string_test.cljs
to be run.
$ lein test clojure.string-test
(:repositories detected in user-level profiles! [:user]
See
Exception in thread "main" java.io.FileNotFoundException: Could not locate clojure/string_test__init.class or clojure/string_test.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name., compiling:(/private/var/folders/jd/9331p3q10ng42jc_d9x_jqz80000gn/T/form-init4952422270888031285.clj:1:125)
It's confusing in the beginning, but thankfully documented: https://github.com/clojure/clojurescript/wiki/Running-the-tests