Fork me on GitHub
#cursive
<
2018-10-11
>
peterwestmacott08:10:24

Is there an easy way to run all tests in a project within Cursive?

Chris15:10:50

Couldn't you create a repl command and then call (clojure.test/run-all-tests)? @cfleming (assuming a repl is open?)

cfleming15:10:17

Yes, you could definitely do that - you wouldn’t get the integration with the red/green icons, but other than that it should work fine.

cfleming15:10:13

I do plan to add a proper test runner at some point, but there’s been surprisingly little demand for it.

😞 1
cfleming08:10:07

@peterwestmacott No, sadly - I’ve been meaning to add a test runner, but right now you’ll have to use lein or whatever you’re using to build.

peterwestmacott09:10:44

it looks like it isn’t too much code to add a helper function to my user ns, I just didn’t want to be doing something needless.

cfleming10:10:40

@carr0t I’m not sure. It might make it easier to support boot projects using deps.edn for their dependencies, and in general understanding IntelliJ’s new build tool framework has helped too.

martinklepsch10:10:27

@cfleming I'm just looking into fixing cljdoc for cursive — can you tell me where I can set an alias again? 😄

martinklepsch10:10:44

(that will be used for any cursive invocations/classpath calculations)

cfleming10:10:13

There are two parts - when Cursive syncs the project, which means it works out which libs you’re using and where your source roots are. For that part, you generally want the superset of the various aliases you use. That’s in View-&gt;Tool Windows-&gt;Clojure Deps, then open the Aliases tree, select the ones you want and hit the refresh icon.

cfleming10:10:22

That should cause Cursive to find your deps (you can check that in the deps Tool Window too) and your source roots (will be marked in blue or green in the Project Tool Window)

martinklepsch10:10:57

I have this but am not seeing an aliases tree

martinklepsch10:10:30

the Clojure Deps window is empty, this comes up once I press the wrench

martinklepsch10:10:42

ah wait, I think I might have missed something

martinklepsch10:10:32

ok, well. I just moved everything to jars now and it seems to be working 👍

martinklepsch10:10:51

I also dropped the alias because it actually doesn't make much of a difference

mhuebert10:10:54

Is macro-resolution support for better-cond something that could make its way onto the roadmap? (https://github.com/Engelberg/better-cond/issues/5) I've seen better-cond come up in discussion several times recently and would like to use it, but I rely so much on Cursive's refactoring support that I can't bear all the unresolved symbols

cfleming10:10:40

@martinklepsch That’s not the deps toolwindow you’re looking at there.

cfleming10:10:05

That’s the settings pane.

cfleming10:10:30

View-&gt;Tool Windows-&gt;Clojure Deps is the menu sequence that will take you to the toolwindow

cfleming10:10:08

@mhuebert Yes, definitely - I like the look of better-cond myself.

1
martinklepsch10:10:50

@cfleming I know but there wasn't a project listed there. There is now but earlier it was empty

cfleming10:10:06

Right, you’ll have to import the project for that to show anything. There are no docs yet but I wrote a bit about this here: https://groups.google.com/d/msg/cursive/NQIJzhGjfEY/hdNXUco8CgAJ

mike_ananev17:10:47

@cfleming Why I can't choose Deps in Mac version? (it is disabled)

cfleming17:10:05

@mike1452 Because that module is managed with Leiningen.

mike_ananev19:10:21

@cfleming Sorry. Didn't catch...can't find how to run deps via Lein section?

cfleming19:10:04

@mike1452 When you set that project up, you imported it using leiningen, right?

cfleming19:10:15

So I guess you have both a project.clj and a deps.edn.

mike_ananev19:10:00

Yes. I have both. But I didn't import, just Opened project folder

mike_ananev19:10:40

@cfleming Got it. I removed project.clj, re-imported project again, selected deps.edn (external model) and now Deps section is active.

cfleming19:10:19

Right, when you open the project folder if you have both project files there you have to tell Cursive which you want to use (the external model question)