Fork me on GitHub
Oliver George04:01:14

I'm trying to add a simple ClojureScript test runner in my CircleCI build process - it works but I have to throw to get an exit code which circleci can see to abort the build process when my tests fail. Can someone suggest a better approach?


you could look into the malli build steps - itโ€™s really well done,


uses kaocha-cljs


and the junit-xml plugin to get nicely formatted test failures in circle

Oliver George22:01:58

Thanks, I'll check it out.

Oliver George04:01:18

Here's what I've got:

Mathieu Pasquet06:01:36

Hi Guys ๐Ÿ‘‹. I can't really wrap my head around how shadow-cljs handles dependencies. All I really want to do is use [this library]( in my project. How can I do that? I tried using deps.edn, but now I can't even start shadow-cljs at all with the following config: shadow-cljs.edn

{:deps true
 :dev-http {8700 "target/"}
 :builds {:app {:output-dir "target/js"
                :asset-path "/js"
                :target :browser
                :build-hooks [(]
                :modules {:costa {:init-fn costa.main/main!}}
                :devtools {:after-load costa.main/reload!}}}}
and deps.edn
{:paths ["src"]
 :deps {thheller/shadow-cljs {:mvn/version <latest>}
        mrmcc3/tailwind-clj {:git/url ""
                             :sha     "67dc8999aef155dc197b4f207932b658e4496d39"}
        re-frame {:mvn/version <latest>}}}
When I try run npx shadow-cljs -d cider/piggieback:0.4.1 -d cider/cider-nrepl:0.22.4 watch :app I get the following error:
shadow-cljs - config: /app/shadow-cljs.edn  cli version: 2.8.83  node: v10.16.3
shadow-cljs - starting via "clojure"
Error building classpath. class clojure.lang.Symbol cannot be cast to class java.lang.CharSequence (clojure.lang.Symbol is in unnamed module of loader 'app'; java.lang.CharSequence is in module java.base of loader 'bootstrap')
java.lang.ClassCastException: class clojure.lang.Symbol cannot be cast to class java.lang.CharSequence (clojure.lang.Symbol is in unnamed module of loader 'app'; java.lang.CharSequence is in module java.base of loader 'bootstrap')
        at clojure.core$re_matcher.invokeStatic(core.clj:4849)
        at clojure.core$re_find.invokeStatic(core.clj:4898)
        at clojure.core$re_find.invoke(core.clj:4898)
        at clojure.lang.MultiFn.invoke(
        at clojure.core.protocols$iter_reduce.invokeStatic(protocols.clj:49)
        at clojure.core.protocols$fn__8140.invokeStatic(protocols.clj:75)
        at clojure.core.protocols$fn__8140.invoke(protocols.clj:75)
        at clojure.core.protocols$fn__8088$G__8083__8101.invoke(protocols.clj:13)
        at clojure.core$reduce.invokeStatic(core.clj:6828)
        at clojure.core$reduce.invoke(core.clj:6810)
        at clojure.lang.RestFn.applyTo(
        at clojure.lang.Var.applyTo(
        at clojure.core$apply.invokeStatic(core.clj:665)
        at clojure.main$main_opt.invokeStatic(main.clj:514)
        at clojure.main$main_opt.invoke(main.clj:510)
        at clojure.main$main.invokeStatic(main.clj:664)
        at clojure.main$main.doInvoke(main.clj:616)
        at clojure.lang.RestFn.applyTo(
        at clojure.lang.Var.applyTo(
        at clojure.main.main(
I'm running in docker (`clojure:openjdk-14-alpine`) with npm installed in my dockerfile.


With :deps true, you have to specify :paths in deps.edn instead of :source-paths in shadow-cljs.edn.

Mathieu Pasquet07:01:08

Sorry, that was just me messing around with things to try troubleshoot. I did originally have :paths in deps.edn as expected. I'll update the post to reflect how things were.


Ah, right. Notice the$version_range_QMARK_ in there. And then check your version for thheller/shadow-cljs.


By <latest>, shadow-cljs documentation just means that you should put the latest version of shadow-cljs there yourself.

Mathieu Pasquet07:01:14

aaaaaah. :man-facepalming: Let me try that..


@U05224H0W Do you think it would be worth it to specify in the documentation that <latest> is just a placeholder and not an actual value that should be in there?

Mathieu Pasquet07:01:41

So yeah, that was the issue ๐Ÿ˜‘. Thanks for your help! re: the <latest> thing in the docs, it's not really a shadow-cljs issue, it's more of a deps.edn thing that I should've known about. However, in my defence, there isn't actually a section on how deps.edn parses those deps instructions that I could find anywhere.

Mathieu Pasquet07:01:06

[this page]( for example doesn't even mention sourcing libs from maven/clojars at all...


What do you mean? The whole page talks specifically about Maven and Git.


This is a reference to the deps.edn file, a bit more information dense than the guide that you linked:


oh yeah should probably clarify that. I think deps.edn actually allows "LATEST" as version, maybe I should use that


I know that "RELEASE" can cause some cache issues. I.e. tools.deps won't check for a new version - it will just use the latest release available in the .m2. I have no idea whether "LATEST" has the same issue - maybe it's worth finding it out.

Mathieu Pasquet08:01:11

@U2FRKM4TW, you're right that the whole page is about git and maven, but if you come to that page with the question "How do I use a library from clojars?", it's not immediately apparent. You have to kinda put together the puzzle pieces. On the other hand, I may just be thick...

Mathieu Pasquet08:01:21

This bit from the second page you linked help answer the question a lot better imo > The deps are a map of library to coordinate. The library is (in Maven terms) the groupId and artifactId, which are sufficient to locate the desired project. The coordinate is used to describe a particular version that is being requested from a particular provider (like Maven).


And it doesn't make sense to add info about Clojars in there. Clojars is just a particular instance of a Maven repository. Maven Central is another one. And there are many, many others. It wouldn't make sense to describe them all in the tools.deps documentation - you just have to know whether what you're using is a Maven repository or not.

Mathieu Pasquet08:01:20

I see your point ๐Ÿ™‚

Wilson Velez19:01:10

I hope you can point me in the right direction, I am working on re-frame app, there is column to mark favorites, I want this favorite thing to be a separate component because Iโ€™m planning to use it in another component, how I do that? is there any tutorial?


there is a #re-frame channel, surely they can help you.


I got stuck on this for a bit , adding the newer transit-js dep to my project fixed it as described, but anyone know why the project.clj in the transit-cljs repo says version "0.8.243" and DOES include the correct transit-js dep, but when including version "0.8.256" in my own project it brings in an older version of transit-js ?


Because the pom is the real build file