This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-26
Channels
- # bangalore-clj (1)
- # beginners (12)
- # boot (48)
- # cider (56)
- # clara (1)
- # cljs-dev (15)
- # clojure (455)
- # clojure-austin (2)
- # clojure-dev (33)
- # clojure-italy (26)
- # clojure-nl (6)
- # clojure-poland (10)
- # clojure-russia (23)
- # clojure-spec (33)
- # clojure-uk (62)
- # clojurescript (37)
- # code-art (2)
- # cursive (12)
- # datomic (48)
- # funcool (1)
- # juxt (16)
- # leiningen (13)
- # off-topic (12)
- # om (23)
- # onyx (16)
- # other-lisps (5)
- # parinfer (2)
- # pedestal (28)
- # re-frame (60)
- # reagent (8)
- # ring (1)
- # ring-swagger (15)
- # spacemacs (5)
- # specter (53)
- # test-check (2)
- # unrepl (8)
- # vim (14)
We updated our ClojureScript dependency to "1.9.660"
and clojure-future-spec to "1.9.0-alpha17"
a few weeks ago. Since then sometimes when we compile our cljs, the compilation fails with the message Attempting to call unbound fn: #'clojure.spec.alpha/macroexpand-check
. This doesn't happen always, and seems to point to different places in our codebase. It's not the same line, and I don't think it's the same namespace (or a set of namespaces). Has anyone had problems like this?
After trying again a few times the compilation passes, and everything seems to work fine
Thanks for the quick response. 🙂 We'll either turn off the parallel build, or like you said, try the master version.
Hi every one! I'm trying to make tests with cljsbuild. I would like to have the auto-run of tests when I change a file, a command like "lein cljsbuild auto test" , but I can't find any example of it. I'm missing something? :thinking_face:
hmm, not sure if you can automatically run tests with cljsbuild.. we use doo https://github.com/bensu/doo
Oh yes, I have seen that library and it seems to do exactly what I want. Unfortunatly my target is nodejs version 0.10.x (with newer version I get an "illegal instruction" from the processor where I run my program) while that library is for newer version (0.12), should I use it anyway? :thinking_face:
any recommendations for streaming a chunked http response? is there a library I should use or use js/fetch
directly?
@mkvlr see examples here http://aleph.io/examples/literate.html#aleph.examples.http
when compiling my minified cljs using lein cljsbuild once min
i'm getting the following error:
Compiling "resources/public/js/compiled/app.js" failed.
clojure.lang.ExceptionInfo: failed compiling file:resources/public/js/min/test/cljs/core.cljc {:file #object[java.io.File 0x43f9c193 "resources/public/js/min/test/cljs/core.cljc"]}
at clojure.core$ex_info.invokeStatic(core.clj:472
...
Caused by: clojure.lang.ExceptionInfo: Assert failed: Circular dependency detected, cljs.core -> cljs.core
(every? (fn* [p1__2581#] (not (contains? *cljs-dep-set* p1__2581#))) deps) in file resources/public/js/min/test/cljs/core.cljc {:tag :cljs/analysis-error}
at clojure.core$ex_info.invokeStatic(core.clj:4725)
at clojure.core$ex_info.invoke(core.clj:4725)
at cljs.analyzer$error.invokeStatic(analyzer.cljc:657)
...
Any thoughts? Here's my project.clj https://github.com/joshkh/bluegenes/blob/mymine/project.clj@danielblack sorry I wasn’t clear, I’m looking for something on the client side, I’m using https://github.com/Day8/re-frame-http-fx
but looks like this and cljs-ajax which it uses under the hood doesn’t support it https://github.com/JulianBirch/cljs-ajax/issues/76
Is there a way to work on a library locally and depend on it with another library, without always lein install
in one and restart repl in the other?
@mkvlr i prefer cljs-http over cljs-ajax because sometimes i want to cancel a request, so i create the request and store the resulting channel in app-db, and then use an effect to handle the response
(reg-fx
:mkvlr/http
(fn [{:keys [on-success on-unauthorized chan]}]
(go
(let [{:keys [statusCode] :as response} (<! chan)]
(if (and statusCode (= statusCode 401))
(dispatch (conj on-authorized response))
(dispatch (conj on-success response)))))))
just solving my own problem above, my cljsbuild min profile had an :output-dir that matched the compiled test js folder. must have been a relic from copying and pasting!
I am finding a difference (actually, quite a few) between cljs.js on the standard clojurescript and lumo. Namely: cljs standard does not define *eval-fn*
and *load-fn*
(meaning that {:eval cljs/js-eval}
needs to be passed as opt
to eval
or it will fail. Also the empty-state
of the standard includes cljs.core
which is quite big. Lumo has defaults for *eval/load-fn*
functions and 'empty-state` is... empty 😉
Hi everybody, I'm trying specs on cljs but can't instrument because "clojure.lang.ExceptionInfo: No such namespace: clojure.test.check"
Am i missing something?
@tiagoantao the purpose of cljs.js
is to be reusable on every environment
if you’re targeting the browser your load-fn is gonna be different than if you’re targeting Node
or JavaScriptCore, like Planck
@tiagoantao as for the empty-state
thing, you can pass the :dump-core false
option to your compiler options
@anmonteiro At the end of the day I think the problem is lack of documentation on the subject. I am taking some notes in order to write something about this in the near future, but my level of maturity is still quite low...
there are docstrings in the cljs.js
functions, and Mike Fikes’s blog is a pretty good source of info: http://blog.fikesfarm.com
@tiagoantao but self-host support should be considered an advanced feature
@tiagoantao It is perhaps not at the level you may need, but if it helps, I gave a talk on self-hosted ClojureScript: https://youtu.be/HnQ89r_dKEM