Fork me on GitHub

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


Known issue with parallel build. You should try master


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


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?


ah I see it’s possible with xmlhttprequest as well…


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[ 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


The dev build works just fine, lein cljsbuild once dev


@danielblack sorry I wasn’t clear, I’m looking for something on the client side, I’m using


but looks like this and cljs-ajax which it uses under the hood doesn’t support it


how about cljs-http ?


what happens if you chuck a 206 partial content header in the request?


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?


@joshkh will give that a try, thanks!


@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

  (fn [{:keys [on-success on-unauthorized chan]}]
      (let [{:keys [statusCode] :as response} (<! chan)]
        (if (and statusCode (= statusCode 401))
          (dispatch (conj on-authorized response))
          (dispatch (conj on-success response)))))))


looks simple enough, thanks


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!


can I get the result of :first-dispatch?


so I can feed it into handlers in my rules?


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:


@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: