Fork me on GitHub
#tools-deps
<
2020-01-07
>
andy.fingerhut04:01:22

Here is an alias I added to the deps.edn of the core.rrb-vector library: https://github.com/clojure/core.rrb-vector/blob/master/deps.edn#L30

andy.fingerhut04:01:13

I wouldn't be surprised if there are better ways, but that is effective and straightforward

seancorfield04:01:18

@deleted-user Have you looked at https://github.com/seancorfield/dot-clojure ? That has a lot of stuff that is very helpful when you're getting started with CLI/`deps.edn`

potetm04:01:44

gonna guess the commas are because both ' and " are special in the shell

potetm04:01:59

so , is a “guaranteed neutral space”

seancorfield04:01:31

The main opts are round-tripped from shell clojure into files on disk and then back again into the shell and then to java.

potetm04:01:39

It’s usually safe to assume these kind of shenanigans when storing shell commands. Nobody does it right.

seancorfield04:01:52

So the quoting/space combinations break in that round-tripping.

seancorfield04:01:08

Cognitect's test-runner is in there.

seancorfield04:01:20

Hence the :test alias and the :runner alias.

potetm04:01:39

It’s usually safe to assume these kind of shenanigans when storing shell commands. Nobody does it right.

seancorfield04:01:34

Well, you can run tests without the test-runner -- clojure.test does have some basic test running logic -- but you won't have a very nice experience 🙂

seancorfield04:01:10

clojure.test/run-all-tests will run all tests that have been loaded (in require'd code).

deleted04:01:29

I wish there was a note about tests on the deps + cli page on http://clojure.org

Alex Miller (Clojure team)04:01:15

if I could trouble you to file an issue so I remember, I'd be happy to do so https://github.com/clojure/clojure-site/issues

seancorfield04:01:04

All the test runners out there look for "test" files (by various means), load the code, and then run all the tests, under whatever filters you provide.

seancorfield04:01:18

FWIW, Boot doesn't have a test runner built-in either. Only Leiningen does.

seancorfield04:01:45

Most of the test runners out there are additional dependencies that offer more features than Leiningen's built-in stuff...

seancorfield04:01:34

It's under consideration to spin off clojure.test into a Contrib lib for Clojure 1.11. I've volunteered to maintain it and one of the things I'll do is add a bunch of documentation to the project, that covers how to run tests with a variety of tools, and how to filter tests etc.

seancorfield04:01:21

Yes, it's for the clojure.test-compatible version of Expectations that I maintain -- but a lot of what's at that link would become "canon" documentation in clojure.test, if I get to maintain it.

seancorfield04:01:25

with-test is tricky to use because the default setup for all the test runners will not see those tests -- hence my notes about what needs to be done 🙂