Fork me on GitHub
#polylith
<
2024-05-19
>
ag22:05:20

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

Patrix23:05:36

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.

Patrix23:05:32

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)…

Patrix23:05:51

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.

👍 3