This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-28
Channels
- # announcements (2)
- # babashka (16)
- # bangalore-clj (1)
- # beginners (93)
- # boot (11)
- # calva (5)
- # cider (13)
- # clj-kondo (49)
- # cljdoc (14)
- # cljs-dev (1)
- # clojure (99)
- # clojure-dev (3)
- # clojure-europe (1)
- # clojure-india (1)
- # clojure-italy (9)
- # clojure-nl (3)
- # clojure-poland (1)
- # clojure-russia (1)
- # clojure-spec (31)
- # clojure-uk (21)
- # clojured (2)
- # clojurescript (18)
- # core-async (12)
- # cursive (36)
- # data-science (1)
- # datomic (54)
- # duct (3)
- # emacs (33)
- # events (1)
- # fulcro (17)
- # jobs (1)
- # joker (8)
- # keechma (1)
- # leiningen (7)
- # malli (8)
- # nrepl (19)
- # pathom (6)
- # planck (18)
- # re-frame (20)
- # reagent (18)
- # shadow-cljs (3)
- # sql (7)
- # vim (31)
@juan.ignacio848 did you have a chance to take a look at this? https://cursive-ide.com/userguide/testing.html
yeah, that's another way of running tests. in fact, if you haven't tried it yet, i highly recommend https://github.com/lambdaisland/kaocha
as for "Run tests in current NS in REPL", it's avaiable only when a cursive repl is running (as with any other cursive context menu items.)
i can't see why not even tough i've not tried myself. it guess, it's just a matter of running multiple repls in multiple tabs.
i use nrepl with deps.edn
and here's what my alias looks like in my deps.edn
:
:aliases {:cider {:extra-deps {cider/cider-nrepl {:mvn/version "0.22.4"}}
:main-opts ["--main" "nrepl.cmdline"
"--middleware" "[cider.nrepl/cider-middleware]"]}
and on the command line i can start a nrepl with: clojure -A:cider
and have cursive connect to it.my key bindings on macos (just for reference):
Run a single test (under caret): Ctrl + Shift + ;
Rerun Last Test: Ctrl + ;
Run All Tests in NS: Ctrl + Alt + ;
I'm just using cmd-shift-a "test"
in a repl namespace and pick from the menu, either run all tests in current NS or just the one under the cursor, then i can re-run the latest test with cmd-r
if i change the test or the implementation. It works from the implementation namespace too.
Cursive isn't updating deps.edn dependencies for me anymore. After I click the refresh button, it will do "Reading projects" for a bit and then produce the 9:39 AM 'Deps: day8.re-frame/re-frame-10x:0.4.4' already disposed: --------------Creation trace:
exception. This may have been happening in https://clojurians.slack.com/archives/C0744GXCJ/p1571418088107600 as well. I can notice it this time because I switched a dep from :git/url
to :local/root
and it isn't changing the classpath -- the dep is stuck on the git version.
Hmm, yeah, this must be related to the other errors you’re seeing. I’ll dig through those stacktraces and see what I can see.
If I switch the REPL to "Run with Deps", I can at least get the dependency to become a local/root. Cursive won't resolve any new/added symbols from the local/root dep & doesn't do the nice auto-reload changed files for the dep (I need to manually to require :reload
)
@cfleming one question about the debugger, I notice when I add a breakpoint on some line, it seems to stop in that line more times than I expect, for example, I created a line that prints something out, when I run the fn
, I see that print happening only once, but the debugger stops in the same line 3 times (when I hit play to keep running), is this expected?
Yes, that can happen. It’s because of macroexpansion - macros expand to a bunch of code that’s all marked as coming from the same line. I’ve been meaning to investigate how to make the debugger handle that but I haven’t gotten around to it.
@onetom I do something similar using Preferences | Appearance & Behavior | Quick Lists. I have one called Testing which looks like this:
Then I just bind a single easy shortcut to that (cmd-shift space) and invoke it, and then select the action I want:
@cfleming The latest EAP, when using local/root in deps, does not auto-add the module…was that an intentional change?