tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
alidlorenzo 2020-06-15T22:44:04.335900Z

tools.deps doesn’t load :local/repo aliases, right? how do you handle conditionally loading dev/test/etc aliases on per subproject basis?

alexmiller 2020-06-15T22:44:42.336300Z

Right, and you don’t

alexmiller 2020-06-15T22:45:02.336800Z

Something we’ve thought about a little

alexmiller 2020-06-15T22:45:13.337200Z

But needs more thinking

alidlorenzo 2020-06-15T22:46:26.338300Z

yeah, I found some archived slack convos about it. kind of hard to appropriately work with monorepos without such a feature, everything has to configured in the root deps.edn (?)

alidlorenzo 2020-06-15T23:03:18.338600Z

what if it aliases were specifically included, just like dependencies are?

{my-subproject {:local/root "./my-subproject"
                :aliases [:dev :test]}}

alexmiller 2020-06-15T23:19:49.339200Z

I’m not going to start from what if - this needs a design process

➕ 3
seancorfield 2020-06-15T23:25:45.342600Z

We have a monorepo at work and we specifically use CLJ_CONFIG to set the "user" deps.edn to come from a specific directory in the monorepo so that we have a single, central place for all repo-wide aliases anyone needs. This also helps maintain repeatability because each developer's "user" deps.edn is excluded and we can control exactly what each alias does.

alidlorenzo 2020-06-15T23:31:47.342700Z

if subprojects have paths that are loaded based on alias, do you configure this all in the central deps.edn instead? e.g {:extra-paths ["subproject1/test" "subproject2/test"]}

seancorfield 2020-06-15T23:52:32.343200Z

It depends on whether the alias (and the optional subproject) are going to be needed for "all" other subprojects or just specific one(s). We scope things appropriately.

⚒️ 1
seancorfield 2020-06-15T23:53:02.343400Z

All our subprojects are at the same level so ../subproject/path always works.