Fork me on GitHub
#tools-deps
<
2020-03-28
>
rgm18:03:02

apologies if this is in the docs, but is there a way to give a path to a deps.edn, instead of assuming it's in the current working directory?

rgm18:03:37

(I'm coexisting with a bunch of Python and I'd prefer to have one deps.edn someplace else and just use long Makefile commands to get at the clojure libs)

rgm18:03:48

symlinks it is ¯\(ツ)

rgm18:03:19

(or rather, I'll just cd other_place && clojure ... to keep my Python colleagues from tripping over the clojure stuff).

seancorfield18:03:18

@rgm One thing you can try is specifying CLJ_CONFIG=/path/to/folder clojure ... where your deps.edn file is /path/to/folder/deps.edn -- this treats that deps.edn file as the user-level one, ignoring your ~/.clojure/deps.edn (and it would still pick up a deps.edn file in the current folder).

seancorfield18:03:46

(so you'd get system deps, CLJ_CONFIG deps, current/project deps)

rgm18:03:06

oh, that's a great trick ... I don't have a ton of deps

rgm18:03:17

don't really even need a current folder one.

rgm18:03:46

(which is what got me going down this path, to keep things tidy).

seancorfield18:03:47

We use this approach in our monorepo at work, so we can have a "standard" user-level deps plus our current subproject deps (and ignore any developer-level user deps on different machines).

🙏 4
rgm18:03:19

right, and because it's env, I can just manage it through settings in Makefile, or .env, or direnv, or ... this is great.

rgm18:03:32

(Can I just say you and Alex are killing it, and it’s much appreciated?)

borkdude19:03:39

@rgm fwiw deps.clj (an unofficial clj script re-implementation, or the binary version deps.exe) does have an option for this

💫 4
rgm19:03:54

I hereby include you in the "killing it" set.