Clojurians
#cljs-dev
<
2015-10-28
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

maria10:10:01

@juhoteperi: I tried your current patch and don’t get any errors when including cljs.js :wink:

maria10:10:29

@juhoteperi: One thing I am not sure about though is when it should recompile dependents. I updated my small test repo and included a small example similar to the one you provided in the ticket (https://github.com/mneise/cljs-1437-test). When I change cljs-1437-test.foo or cljs-1437-test.foo2 and then re-build, I would expect that cljs-1437-test.core is also recompiled, but this doesn’t seem to be the case for me. I am probably missing something in my setup?

juhoteperi10:10:53

@maria: Did you apply the patch? The cljs build number with the patch is 161 for me.

maria10:10:24

@juhoteperi: Should it also work with the build script, e.g. build once, make some changes and then build again?

juhoteperi11:10:55

@maria: I think it should work, but I can reproduce the problem.

juhoteperi11:10:09

I probably found the reason: ns-dependets doesn't correctly return dependents of namespace being compiled: https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/compiler.cljc#L1335-L1336

juhoteperi11:10:21

Could be because *inputs* is not bound with the new build pipeline

juhoteperi11:10:06

I'll try to fix this later today

juhoteperi11:10:33

Not sure why it works with watch though

chrisn21:10:33

Hey, we are trying to use the cljs testing system with phantomjs. We would like to exit nonzero if any tests fail. The recommended approach:

(defmethod report [:cljs.test/default :end-run-tests] [m]
  (println "\nYO!!!Ran" (:test m) "tests containing"
           (+ (:pass m) (:fail m) (:error m)) "assertions.")
  (println (:fail m) "failures," (:error m) "errors.")
  (aset js/window "test-failures" (+ (:fail m) (:error m))))
fails if there are any async tests. In fact, it isn't clear how to get any results when there are async tests.

chrisn21:10:10

basically I believe that :end-run-tests is not called if there are asynchronous tests.

bensu22:10:21

Hi @chrisn we are using :end-run-tests for async tests successfully in doo https://github.com/bensu/doo/blob/master/library/src/doo/runner.cljs#L53

bensu22:10:47

If I had to guess, your problem lies in the phantom runner, which is tricky to implement. I think this question is better suited for #C03S1L9DN

chrisn22:10:46

OK, good info. I will repost there and consider just using doo.