This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
How do you deal with nested dev dependencies?
if I want to have a base with :dev
alias and :extra-deps
, these dependencies won't be available in dev time, unless I explicitly add them to :dev in the root deps.edn, right?
Is there a better way of dealing with nested :dev deps and extra-paths?
I don't understand why using -M:dev
at the root level doesn't automatically resolve :extra-paths
and :extra-deps
in the bricks that have :dev
alias
The clojure CLI doesn’t recursively resolve the alias of all dependencies. And this is what’s going on here, your development project (the one with the root deps.edn file) loads dependencies, including the components and the base.
Imagine if, using a non-polylith project for the sake of simplicity, when you specify a :dev alias, you would pull in all the :dev aliases of all the dependencies in your deps.edn. Stuff you’re not working on (ring, reitit, whatever)…
Anyway the idea is that dev related dependencies and aliases are defined in your development project. Bricks are agnostic to where they are deployed, meaning they are not aware/should not “care” whether they are being used in development or in a deployed project. That’s the job of the project, to handle these scenarios.