Fork me on GitHub

Any chance that tda will support providing multiple config files? e.g. by allowing CLJ_CONFIG to be ~/.clojure:/considered/first This would be great to share a deps.edn via dotfiles or in a monorepos. context: I'd like to curate a deps.edn for the team I'm working with. This file would contain aliases and overrides that are now duplicated across repositories. This file should exist along a user's ~/.clojure/deps.edn . E.g. CLJ_CONFIG=~/.clojure:~/.clojure/work clojure -Sdescribe would result in ...:config-files ["<global>/deps.edn" "~/.clojure/deps.edn" "~/.clojure/work/deps.edn" ?"$PWD/deps.edn"] ensuring that within the team we share aliases while allowing for user-specific aliases and versions (e.g. for editor setup). In a monorepos I can see this being helpful as well. E.g. with the following project setup and a global export CLJ_CONFIG=~/.clojure :

├── shared/deps.edn
└── subproject1/deps.edn
doing export CLJ_CONFIG=$CLJ_CONFIG:/path/to/project/shared as part of a project setup (or in scripts) would allow one to move through the project and have a config-files collection of ["<global>/deps.edn" "~/.clojure/deps.edn" "/path/to/project/shared/deps.edn" ?"$PWD/deps.edn"]


Write a tool to update the deps edn file in each repo


@U09LZR36F thought about going that way but seems hard to maintain across a lot of repositories...


In our case it would be the amount of repositories (50-ish). Also the contents of the deps.edn: some contain a linter alias, others a clj-kondo, any docs for existing alias. And then doing it for every update to the shared stuff. Have you successfully applied this approach?


Not to 50 or so repos. But if you want people to actually update, then you probably want to push it into their repo, instead of hoping that they will update it on their local machine.

Alex Miller (Clojure team)12:07:53

Not planning to make CLJ_CONFIG into a path but we may at some point add some way to have additional deps files


good to hear it's being considered, thanks


I would stop relying on CLJ_CONFIG if I could specify one or more additional deps.edn files that went into this slot: <system> <user> &lt;additional file(s) here&gt; <project>.

Alex Miller (Clojure team)16:07:36

I prefer that way of thinking about it to path idea above

Alex Miller (Clojure team)16:07:31

we had lots of questions the last time we talked through this. Some of those have been resolved since, some have not.

Alex Miller (Clojure team)16:07:42

we = Rich and I, that is


The scenarios I sketched could then be solved by specifying an alias or wrapper like clj --deps project-deps.edn [email protected] ?

Alex Miller (Clojure team)20:07:01

well that is the question - how would you want to work with this in practice