This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-09
Channels
- # aws (51)
- # beginners (57)
- # calva (10)
- # chlorine-clover (7)
- # cider (20)
- # clj-kondo (55)
- # clojure (43)
- # clojure-europe (9)
- # clojure-italy (1)
- # clojure-nl (5)
- # clojure-spec (8)
- # clojure-uk (71)
- # clojurescript (33)
- # core-async (22)
- # cursive (20)
- # datomic (3)
- # emacs (8)
- # figwheel-main (8)
- # fulcro (13)
- # garden (2)
- # graalvm (60)
- # graphql (26)
- # jobs (6)
- # joker (6)
- # kaocha (2)
- # lambdaisland (5)
- # malli (36)
- # off-topic (9)
- # portkey (15)
- # re-frame (3)
- # reagent (25)
- # remote-jobs (4)
- # spacemacs (3)
- # sql (111)
- # tree-sitter (29)
- # uncomplicate (3)
- # xtdb (2)
Hi everyone. I'm new to Calva and trying to create an efficient workflow. I have a shadow-cljs project, with some unit tests (using a :node-test target in shadow-cljs.edn) and it's running my tests fine. I'm, trying to see what Calva can do for unit testing, but when I connect to my running :node-test repl, and try to run namespace tests with Calva, I always get "No tests found". Same thing if I try to run a specific test. In addition to the no tests found message, I always see the following message: "No application has connected to the REPL server. Make sure your JS environment has loaded your compiled ClojureScript code.". My project is a NodeJS project, not a browser project. Any hint on what I'm doing wrong?
@mathieu.durand, welcome!
Calva can't run shadow-cljs tests, yet. I don't right now remember what is the problem, but it probably is something with how tests are discovered by cider-nrepl. What I do is that I have :auto-run true
on the test target. See Calva's shadow-cljs.edn
for an example: https://github.com/BetterThanTomorrow/calva/blob/c9320a00b3dce0dce1c107d6931c32396b72b9b9/shadow-cljs.edn#L25
Then when I jack in I tell Calva to start both builds, but I connect to the node library one and have the jack-in terminal visible as I work with the code.
As for the ”No application has connected” message... It's tricky without knowing more about your project config and how you start the app. Can you elaborate some?
Hi, my team uses CIDER, Cursive and (increasingly) Calva. I can't work out how to get a 2-space indent though, so all our PRs are full of whitespace changes. Here's what I'm after:
(defn add [x y]
(+ x y)) ;; perfect
(rf/reg-sub :sum-x-y
(fn [db] (add (:x db) (:y db)))) ;; no, too far!
I can find lots of discussion about this kind of thing but so far not the answer, I would be super grateful if someone could point me in the right direction?Hi, @conan. This is currently not possible with Calva. There is a PR that is starting to add it, but it is sonewhat dormant. I have merged that PR into a branch and am trying to find time for it. This branch: https://github.com/BetterThanTomorrow/calva/tree/wip/cljfmt-config If you have some time to look at it, I'd be happy to give you some pointers on where to dig.