tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
eval2020 2020-07-14T11:54:21.376100Z

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"]

dominicm 2020-07-14T12:15:47.376600Z

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

eval2020 2020-07-15T14:05:13.393Z

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?

dominicm 2020-07-15T15:23:44.393200Z

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.

alexmiller 2020-07-14T12:25:53.379Z

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

eval2020 2020-07-14T12:40:08.379600Z

good to hear it's being considered, thanks

eval2020 2020-07-14T12:43:20.379700Z

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

dominicm 2020-07-14T13:43:22.380Z

Why's that

seancorfield 2020-07-14T15:33:19.381200Z

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>.

alexmiller 2020-07-14T16:37:36.381600Z

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

alexmiller 2020-07-14T16:38:31.382400Z

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

alexmiller 2020-07-14T16:38:42.382700Z

we = Rich and I, that is

eval2020 2020-07-14T19:42:13.384400Z

The scenarios I sketched could then be solved by specifying an alias or wrapper like clj --deps project-deps.edn $@ ?

alexmiller 2020-07-14T20:06:01.384700Z

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