We would like to use a hybrid leinigen/tools.deps configuration so that those who want to use clojure tools may do so, and we get some of the other benefits of tools.deps without losing the automation for project building etc that leinigen provides.
Solution
We can do this with the lein-tools-deps library. So this PR adds a deps.edn file for dependencies and adjusts our project.clj to use lein-tools-deps.
One caveat that we may want to be aware of is that lein-tools-deps warns that the tool can make it hard on users where ther are dependency conflicts (see here).
How to test
Run lein repl
[x] Confirm that you can load the repl
While in the repl, do (require '[tablecloth.api :as tabl]).
[x] Confirm that this works, i.e. the dependency is present.
Exit the repl and run lein test
[x] Confirm that the test run and pass
Run lein lint
[x] Confirm that the linters run
Now we'll make sure we aren't loading dev dependencies in non-dev mode. Run this command : lein with-profile -dev deps :tree | grep midje. (The with-profile -dev disables the dev profile).
[x] Confirm that you do not see any midje dependency in the output.
Problem/Goal
We would like to use a hybrid leinigen/tools.deps configuration so that those who want to use clojure tools may do so, and we get some of the other benefits of tools.deps without losing the automation for project building etc that leinigen provides.
Solution
We can do this with the lein-tools-deps library. So this PR adds a
deps.edn
file for dependencies and adjusts ourproject.clj
to use lein-tools-deps.One caveat that we may want to be aware of is that lein-tools-deps warns that the tool can make it hard on users where ther are dependency conflicts (see here).
How to test
lein repl
(require '[tablecloth.api :as tabl])
.lein test
lein lint
lein with-profile -dev deps :tree | grep midje
. (Thewith-profile -dev
disables the dev profile).