Fork me on GitHub
#cider
<
2020-04-27
>
Spaceman20:04:28

I see that there's a cider-test.el for running tests in clj. Is there a good reason why there isn't a cljs analogue to it? What modifications would be needed to create one?

Spaceman20:04:13

say I'm running tests with shadow-cljs

dominicm21:04:01

You'd need to hook into piggyback to run evaluations and capture the test results, and then serialize them into the same format used by the clj tests. It's not infinitely difficult, someone just needs to pick it up

jaide22:04:43

I've been getting a lot of these kinds of errors working with cider in a shadow-cljs project lately. I don't recall encountering these on other shadow-cljs I've worked on. Anyone experience these and know the cause?

dpsutton22:04:11

what's the stacktrace @jayzawrotny?

jaide22:04:28

complete_for_nrepl.clj:  119  cider.nrepl.inlined-deps.suitable.v0v3v5.suitable.complete-for-nrepl/node-env?
    complete_for_nrepl.clj:  106  cider.nrepl.inlined-deps.suitable.v0v3v5.suitable.complete-for-nrepl/node-env?
    complete_for_nrepl.clj:  126  cider.nrepl.inlined-deps.suitable.v0v3v5.suitable.complete-for-nrepl/ensure-suitable-cljs-is-loaded/fn
                  AFn.java:  152  clojure.lang.AFn/applyToHelper
                  AFn.java:  144  clojure.lang.AFn/applyTo
                  core.clj:  665  clojure.core/apply
                  core.clj: 1973  clojure.core/with-bindings*
                  core.clj: 1973  clojure.core/with-bindings*
               RestFn.java:  425  clojure.lang.RestFn/invoke
    complete_for_nrepl.clj:  123  cider.nrepl.inlined-deps.suitable.v0v3v5.suitable.complete-for-nrepl/ensure-suitable-cljs-is-loaded
    complete_for_nrepl.clj:  121  cider.nrepl.inlined-deps.suitable.v0v3v5.suitable.complete-for-nrepl/ensure-suitable-cljs-is-loaded
    complete_for_nrepl.clj:  181  cider.nrepl.inlined-deps.suitable.v0v3v5.suitable.complete-for-nrepl/handle-completion-msg!
    complete_for_nrepl.clj:  164  cider.nrepl.inlined-deps.suitable.v0v3v5.suitable.complete-for-nrepl/handle-completion-msg!
    complete_for_nrepl.clj:  202  cider.nrepl.inlined-deps.suitable.v0v3v5.suitable.complete-for-nrepl/complete-for-default-cljs-env
    complete_for_nrepl.clj:  195  cider.nrepl.inlined-deps.suitable.v0v3v5.suitable.complete-for-nrepl/complete-for-default-cljs-env
    complete_for_nrepl.clj:  232  cider.nrepl.inlined-deps.suitable.v0v3v5.suitable.complete-for-nrepl/complete-for-nrepl
    complete_for_nrepl.clj:  227  cider.nrepl.inlined-deps.suitable.v0v3v5.suitable.complete-for-nrepl/complete-for-nrepl
              complete.clj:   40  cider.nrepl.middleware.complete/complete
              complete.clj:   30  cider.nrepl.middleware.complete/complete
              complete.clj:   54  cider.nrepl.middleware.complete/complete-reply
              complete.clj:   53  cider.nrepl.middleware.complete/complete-reply
        error_handling.clj:  160  cider.nrepl.middleware.util.error-handling/eval24668/fn
              MultiFn.java:  234  clojure.lang.MultiFn/invoke
              complete.clj:   66  cider.nrepl.middleware.complete/handle-complete
              complete.clj:   65  cider.nrepl.middleware.complete/handle-complete
                  Var.java:  388  clojure.lang.Var/invoke
                 nrepl.clj:  132  cider.nrepl/wrap-complete/fn
            middleware.clj:   16  nrepl.middleware/wrap-conj-descriptor/fn
                 nrepl.clj:  321  cider.nrepl/wrap-profile/fn
            middleware.clj:   16  nrepl.middleware/wrap-conj-descriptor/fn
               nrepl04.clj:  232  shadow.cljs.devtools.server.nrepl04/cljs-load-file/fn
            middleware.clj:   16  nrepl.middleware/wrap-conj-descriptor/fn
               nrepl04.clj:  193  shadow.cljs.devtools.server.nrepl04/cljs-select/fn
            middleware.clj:   16  nrepl.middleware/wrap-conj-descriptor/fn
               session.clj:  272  nrepl.middleware.session/session/fn
            middleware.clj:   16  nrepl.middleware/wrap-conj-descriptor/fn
               nrepl04.clj:  359  shadow.cljs.devtools.server.nrepl04/start/fn
                server.clj:   18  nrepl.server/handle*
                server.clj:   15  nrepl.server/handle*
                server.clj:   27  nrepl.server/handle/fn
                  core.clj: 2030  clojure.core/binding-conveyor-fn/fn
                  AFn.java:   18  clojure.lang.AFn/call
           FutureTask.java:  266  java.util.concurrent.FutureTask/run
   ThreadPoolExecutor.java: 1149  java.util.concurrent.ThreadPoolExecutor/runWorker
   ThreadPoolExecutor.java:  624  java.util.concurrent.ThreadPoolExecutor$Worker/run
               Thread.java:  748  java.lang.Thread/run

bozhidar04:04:35

The improved cljs completion still doesn’t work very well with shadow-cljs it seems. //cc @U08LZDL1H Use (setq cider-enhanced-cljs-completion-p nil) to disable it.

bozhidar05:04:16

It will generally be good to file an issue with clj-suitable as well, so that the underlying problem is identified and fixed.

jaide13:04:10

Was just about to paste a link to the issue you replied to here. I will create the issue now.

dpsutton23:04:52

That’s the suitable stuff. I leave that turned off I believe

dpsutton23:04:01

I’ve hit so many cases that don’t work