Fork me on GitHub
#shadow-cljs
<
2020-04-05
>
papachan16:04:52

Hello, since i enabled :deps true i have this error with devtools: Could not locate shadow/cljs/devtools/cli__init.class, shadow/cljs/devtools/cli.clj or shadow/cljs/devtools/cli.cljc on classpath.

papachan16:04:25

Ok it was missing thheller/shadow-cljs {:mvn/version "2.8.94"}

pithyless17:04:05

Anyone using nubank/matcher-combinators with Shadow? I'm requiring matcher-combinators.test in my cljc ns, but the :browser-test target is not picking up any such assertions: (is (match? 2 1)) If I switch to (is (= 2 1)) the error is reported and I have +1 assertions total.

mauricio.szabo19:04:05

I also created a library (check) that wraps matcher-combinators for cases where you can't simply use kaocha

pithyless20:04:18

Thanks for confirming, I linked to the same issue in the next thread-reply. Also, thanks for pointing me to your library - https://github.com/mauricioszabo/check - I'll be sure to review the source tomorrow for some testing ideas. ;) I see you're also parsing and transforming the :match return value here: https://github.com/mauricioszabo/check/blob/master/src/check/core.cljc#L13-L24

pithyless17:04:28

I'm wondering if this just won't work out of the box, without some additional plumbing; e.g. I've found Kaocha has some custom reporter plumbing - https://github.com/lambdaisland/kaocha/blob/master/src/kaocha/matcher_combinators.clj - or if I may have just missed something and someone has this working locally.

papachan22:04:58

Can i use a different library for each build like this with shadow-cljs?

{:paths ["src/cljs"]

 :deps
 {thheller/shadow-cljs {:mvn/version "2.8.94"}
  binaryage/devtools {:mvn/version "1.0.0"}
  reagent {:mvn/version "0.10.0"}
  re-frame {:mvn/version "0.12.0"}
  day8.re-frame/http-fx {:mvn/version "v0.2.0"}}

 :aliases
 {:dev
  {:extra-deps
   {day8.re-frame/tracing {:mvn/version  "0.5.3"}}}
  :prod
  {:extra-deps
   {day8.re-frame/tracing-stubs {:mvn/version "0.5.3"}}}}}

papachan22:04:18

well i am stucked by this error: [:app] Build failure: The required namespace "day8.re-frame.tracing" is not available, it was required by "frontend/events.cljs".

papachan22:04:30

Got it working now. thanks. :thumbsup: