tools.deps doesn’t load :local/repo aliases, right? how do you handle conditionally loading dev/test/etc aliases on per subproject basis?
Right, and you don’t
Something we’ve thought about a little
But needs more thinking
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 (?)
what if it aliases were specifically included, just like dependencies are?
{my-subproject {:local/root "./my-subproject"
:aliases [:dev :test]}}
I’m not going to start from what if - this needs a design process
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.
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"]}
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.
All our subprojects are at the same level so ../subproject/path
always works.